Correct imports and variable naming.
This commit is contained in:
parent
7fbe89f60d
commit
b89a8c9df8
10
jsonenums.go
10
jsonenums.go
@ -75,7 +75,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/adfin/jsonenums/parser"
|
"github.com/campoy/jsonenums/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -92,16 +92,16 @@ func main() {
|
|||||||
types := strings.Split(*typeNames, ",")
|
types := strings.Split(*typeNames, ",")
|
||||||
|
|
||||||
// Only one directory at a time can be processed, and the default is ".".
|
// Only one directory at a time can be processed, and the default is ".".
|
||||||
in_dir := "."
|
inDir := "."
|
||||||
if args := flag.Args(); len(args) == 1 {
|
if args := flag.Args(); len(args) == 1 {
|
||||||
in_dir = args[0]
|
inDir = args[0]
|
||||||
} else if len(args) > 1 {
|
} else if len(args) > 1 {
|
||||||
log.Fatalf("only one directory at a time")
|
log.Fatalf("only one directory at a time")
|
||||||
}
|
}
|
||||||
dir, err := filepath.Abs(in_dir)
|
dir, err := filepath.Abs(inDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to determine absolute filepath for requested path %s: %v",
|
log.Fatalf("Unable to determine absolute filepath for requested path %s: %v",
|
||||||
in_dir, err)
|
inDir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg, err := parser.ParsePackage(dir)
|
pkg, err := parser.ParsePackage(dir)
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
"go/format"
|
"go/format"
|
||||||
|
|
||||||
"github.com/adfin/jsonenums/parser"
|
"github.com/campoy/jsonenums/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user