Closed aastein closed 4 years ago
Can't we instead just generate everything from goPackagePath
and the major version? Since it'll always be
tokens := strings.Split(goPackagePath, "/")
goPackageName := fmt.Sprintf("%v/%v/%v", tokens[:3], semverVersion.Major(), tokens[3:])
EDIT: Actually I guess that's just the standard way, but not technically a requirement for module naming, so never mind.
Some other minimal suggestions that maybe are nice?
go-package-path
could be just the path from the base. Or if not, maybe validate that the other one is contained in itgo-service-package
to go-module-name
Hey, do we need to update this as well? https://github.com/Clever/dev-handbook/blob/master/make/wag.mk And here? https://github.com/Clever/template-wag/commits/master/wag.mk
Not sure anymore how these versions get maintained
v4.0.0: import package with correct module version
new CLI flag: -output-path
assumptions: the code assumes it is being run in the same directory as the go.mod file
usage:
Changes to exported types, methods, and functions:
does not break existing uses of v3 CLI
redefines swagger/swagger.go
type Generator struct
changes function signature of
func Generate
func Generate
func GenerateDB
[x] Run
make build
[x] Run
make generate
[x] Update the current version in the
/VERSION
file.