mirror of https://github.com/dmarkham/enumer.git
add posibility to reference as separate module
This commit is contained in:
parent
dac46c828e
commit
2cd1d1c7c3
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
1. Go get enumer `go get -u github.com/dmarkham/enumer`
|
1. Go get enumer `go get -u github.com/igormiku/enumer`
|
||||||
2. `go generate` This should create `pill_enumer.go`
|
2. `go generate` This should create `pill_enumer.go`
|
||||||
3. `go run *.go` to see it in action
|
3. `go run *.go` to see it in action
|
||||||
4. `go mod tidy` to remove the deps for `enumer` once your happy.
|
4. `go mod tidy` to remove the deps for `enumer` once your happy.
|
||||||
|
|
|
@ -2,7 +2,7 @@ package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
//go:generate go run github.com/dmarkham/enumer -type=Pill -json
|
//go:generate go run github.com/igormiku/enumer -type=Pill -json
|
||||||
type Pill int
|
type Pill int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/dmarkham/enumer
|
module github.com/igormiku/enumer
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/pascaldekloe/name v1.0.0
|
github.com/pascaldekloe/name v1.0.0
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// Enumer is a tool to generate Go code that adds useful methods to Go enums (constants with a specific type).
|
// Enumer is a tool to generate Go code that adds useful methods to Go enums (constants with a specific type).
|
||||||
// It started as a fork of Rob Pike’s Stringer tool
|
// It started as a fork of Rob Pike’s Stringer tool
|
||||||
//
|
//
|
||||||
// Please visit http://github.com/dmarkham/enumer for a comprehensive documentation
|
// Please visit http://github.com/igormiku/enumer for a comprehensive documentation
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -71,7 +71,7 @@ func Usage() {
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "\tEnumer [flags] -type T [directory]\n")
|
_, _ = fmt.Fprintf(os.Stderr, "\tEnumer [flags] -type T [directory]\n")
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "\tEnumer [flags] -type T files... # Must be a single package\n")
|
_, _ = fmt.Fprintf(os.Stderr, "\tEnumer [flags] -type T files... # Must be a single package\n")
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "For more information, see:\n")
|
_, _ = fmt.Fprintf(os.Stderr, "For more information, see:\n")
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "\thttp://godoc.org/github.com/dmarkham/enumer\n")
|
_, _ = fmt.Fprintf(os.Stderr, "\thttp://godoc.org/github.com/igormiku/enumer\n")
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "Flags:\n")
|
_, _ = fmt.Fprintf(os.Stderr, "Flags:\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue