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
Copy file name to clipboardExpand all lines: README.md
+14-37Lines changed: 14 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,24 +54,16 @@ Following installation, `generate-fix` is installed to `$GOPATH/bin/generate-fix
54
54
Developing QuickFIX/Go
55
55
----------------------
56
56
57
-
If you wish to work on QuickFIX/Go itself, you will first need [Go](http://www.golang.org) installed on your machine (version 1.6+ is *required*).
57
+
If you wish to work on QuickFIX/Go itself, you will first need [Go](http://www.golang.org) installed and configured on your machine (version 1.13+ is preferred, but the minimum required version is 1.6).
58
58
59
-
For local dev first make sure Go is properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH).
60
-
61
-
Next, using [Git](https://git-scm.com/), clone this repository into `$GOPATH/src/github.com/quickfixgo/quickfix`.
59
+
Next, using [Git](https://git-scm.com/), clone the repository via `git clone git@github.com:quickfixgo/quickfix.git`
62
60
63
61
### Installing Dependencies
64
62
65
-
QuickFIX/Go uses [dep](https://github.com/golang/dep) to manage the vendored dependencies. Install dep with `go get`:
66
-
67
-
```sh
68
-
$ go get -u github.com/golang/dep/cmd/dep
69
-
```
70
-
71
-
Run `dep ensure` to install the correct versioned dependencies into `vendor/`, which Go 1.6+ automatically recognizes and loads.
63
+
As of Go version 1.13, QuickFIX/Go uses [modules](https://github.com/golang/go/wiki/Modules) to manage dependencies. You may require `GO111MODULE=on`. To install dependencies, run
72
64
73
65
```sh
74
-
$ $GOPATH/bin/dep ensure
66
+
go mod download
75
67
```
76
68
77
69
**Note:** No vendored dependencies are included in the QuickFIX/Go source.
@@ -117,37 +109,22 @@ To run acceptance tests,
117
109
118
110
If you are developing QuickFIX/Go, there are a few tasks you might need to perform related to dependencies.
119
111
120
-
#### Adding a dependency
121
-
122
-
If you are adding a dependency, you will need to update the dep manifest in the same Pull Request as the code that depends on it. You should do this in a separate commit from your code, as this makes PR review easier and Git history simpler to read in the future.
112
+
#### Adding/updating a dependency
123
113
124
-
To add a dependency:
125
-
126
-
1. Add the dependency using `dep`:
127
-
```bash
128
-
$ dep ensure -add github.com/foo/bar
129
-
```
130
-
2. Review the changes in git and commit them.
114
+
If you are adding or updating a dependency, you will need to update the `go.mod` and `go.sum` in the same Pull Request as the code that depends on it. You should do this in a separate commit from your code, as this makes PR review easier and Git history simpler to read in the future.
131
115
132
-
#### Updating a dependency
133
-
134
-
To update a dependency to the latest version allowed by constraints in `Gopkg.toml`:
135
-
136
-
1. Run:
137
-
```bash
138
-
$ dep ensure -update github.com/foo/bar
116
+
1. Add or update the dependency like usual:
117
+
```sh
118
+
go get -u github.com/foo/bar
139
119
```
140
-
2. Review the changes in git and commit them.
141
-
142
-
To change the allowed version/branch/revision of a dependency:
143
-
144
-
1. Manually edit `Gopkg.toml`
145
-
2. Run:
146
-
```bash
147
-
$ dep ensure
120
+
2. Update the module-related files:
121
+
```sh
122
+
go mod tidy
148
123
```
149
124
3. Review the changes in git and commit them.
150
125
126
+
Note that to specify a specific revision, you can manually edit the `go.mod` file and run `go mod tidy`
Copy file name to clipboardExpand all lines: cmd/generate-fix/internal/generate.go
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ import (
13
13
14
14
var (
15
15
useFloat=flag.Bool("use-float", false, "By default, FIX float fields are represented as arbitrary-precision fixed-point decimal numbers. Set to 'true' to instead generate FIX float fields as float64 values.")
16
+
pkgRoot=flag.String("pkg-root", "github.com/quickfixgo", "Set a string here to provide a custom import path for generated packages.")
0 commit comments