Skip to content

kimai07/goskelton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goskelton

install

$ go get -u github.com/kimai07/goskelton

help

$ goskelton -h
NAME:
   goskelton - goskelton

USAGE:
   goskelton [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --project value  generated project name
   --user value     git user name for package import path in skelton file [$GOSKELTON_USER]
   --dest value     path for under which directory to create project skelton (default: ".") [$GOSKELTON_DEST_DIR]
   --help, -h       show help
   --version, -v    print the version

setup project

create project

$ goskelton --user kimai07 --dest . --project sample-prj
2019/04/15 10:50:35 [INFO] Created ./sample-prj
2019/04/15 10:50:35 [INFO] Created ./sample-prj/Makefile
2019/04/15 10:50:35 [INFO] Created ./sample-prj/main.go
2019/04/15 10:50:35 [INFO] Created ./sample-prj/src/hello
2019/04/15 10:50:35 [INFO] Created ./sample-prj/src/hello/hello.go
2019/04/15 10:50:35 [INFO] Created ./sample-prj/src/hello/hello_test.go
$ cd sample-prj
$ tree
.
├── Makefile
├── go.mod
├── main.go
└── src
    └── hello
        ├── hello.go
        └── hello_test.go

2 directories, 5 files

init modules

$ make init_mod
go mod init github.com/kimai07/sample-prj
go: creating new go.mod: module github.com/kimai07/sample-prj

run

$ go run main.go
Hello!
$ make test_unit
go test -v ./src/...
go: finding github.com/stretchr/testify/assert latest
?       github.com/kimai07/sample-prj [no test files]
=== RUN   TestGetHello
--- PASS: TestGetHello (0.00s)
PASS
ok      github.com/kimai07/sample-prj/src/hello       0.024s

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages