You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capstan:Migrate to Go Modules and Update APIs (#183)
As a Go project, Capstan uses godep as its dependency manager,
however, as of Go 1.11, Go's new dependency management system(Go
Modules) is introduced officially, more and more Go projects use Go
Modules to make dependency version information explicit and easier to
manage, this patch makes Capstan migrate to Go Modules and update
codes to use the latest APIs, here are details:
- Delete Godeps directory, add go.mod and go.sum file, which are
generated by `go mod` command and declare Capstan project is managed
with Go Modules now
- Update packages import path, change urfave/cli from v1 to v2, change
cheggaaa/pb from v0 to v3, all packages are newest released version
- Update code to adapt new APIs according to the old/new API doc
- Update the installation.md, use Go 1.11+ to build/manage Capstan on
Module Mode
See [Go Modules Blogs](https://blog.golang.org/using-go-modules) to
learn more
Signed-off-by: kayhaw <[email protected]>
That's it, we have Capstan installed. You should be able to use Capstan immediately because it was
70
-
installed in `$GOPATH/bin` added to your `$PATH` above. To test that it works, try:
71
+
That's it, we have Capstan installed. You should be able to use Capstan immediately because it was installed in `$GOPATH/bin` added to your `$PATH` above. To test that it works, try:
71
72
```
72
73
capstan --help
73
74
```
74
75
76
+
## Maintain Capstan
77
+
Capstan is managed with Go Modules as [recommended](https://blog.golang.org/using-go-modules), while developing on Capstan, you should follow these steps:
78
+
1. Update import path and corresponding code as you might do
79
+
2. Test you changes with `go test ./...`
80
+
3. Clear up `go.mod` and `go.sum` file with `go mod tidy`
81
+
82
+
Then you are ready to tag and release new version. To learn more details about maintaining Go project on Module Mode, see [Go Modules Serial Blogs](https://blog.golang.org/using-go-modules)
83
+
75
84
## Configure Capstan (advanced)
76
85
Capstan uses optimized default values under the hood. But you are allowed to override them with
77
86
your own values and this section describes how. Actually, there are three ways to override them
0 commit comments