Skip to content

Commit 5ffe0c1

Browse files
committed
add package management
1 parent fd67513 commit 5ffe0c1

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
- [(S) IIFE](#s-iife)
3333
- [(S) Closures](#s-closures)
3434
- [Concurrency](#concurrency)
35-
- [Package Management](#package-management)
35+
- [Packages](#packages)
36+
- [Import system](#import-system)
37+
- [Management](#management)
3638
- [Patterns](#patterns)
3739
- [Quick Syntax Reminders](#quick-syntax-reminders)
3840
- [(D) String literals](#d-string-literals)
@@ -360,8 +362,23 @@ More on this subject:
360362
- [Go Concurrency Patterns](https://talks.golang.org/2012/concurrency.slide#1)
361363
- [Advanced Go Concurrency Patterns](https://talks.golang.org/2013/advconc.slide#1)
362364

363-
# Package Management
365+
# Packages
366+
## Import system
367+
Javascript has an official [import statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import), however the external specs of AMD & CommonJS are more popular since the language began to address this issue rather late.
364368

369+
Go's import statement and package support were part of the spec from the beginning. As of Go 1.6 (or 1.5 + flag), there's better support for encapsulating dependent packages inside a project with the [vendor folder](https://blog.gopheracademy.com/advent-2015/vendor-folder/). However, it doesn't attempt so solve everything:
370+
> … this does not attempt to solve the problem of vendoring resulting in multiple copies of a package being linked into a single binary. Sometimes having multiple copies of a library is not a problem; sometimes it is. At least for now, it doesn’t seem that the go command should be in charge of policing or solving that problem.
371+
372+
## Management
373+
For Javascript development, NPM is the de-facto package manager for NodeJS, and may also be used for client side projects. Bower is also a popular for client side projects.
374+
375+
The go tool will only get your as far as getting a dependency latest master code. This will not suffice if you need accurate dependency management with pinned versions. The Go community came up with several package managers, here's a partial list:
376+
- https://github.com/kovetskiy/manul
377+
- https://github.com/tools/godep
378+
- https://github.com/kardianos/govendor
379+
- https://github.com/FiloSottile/gvt
380+
- https://github.com/Masterminds/glide
381+
- https://github.com/mattn/gom
365382

366383
# Patterns
367384

0 commit comments

Comments
 (0)