$ go run main.go --help
RentalGames API server
Usage:
rentalgames [command]
Available Commands:
debug Debug API server
help Help about any command
Flags:
-E, --env string API server environment (default "develop")
-h, --help help for rentalgames
Use "rentalgames [command] --help" for more information about a command.
$ go run main.go debug -p 8888
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] Loaded HTML Templates (4):
- index.tmpl
- kakao.tmpl
- login.html
-
[GIN-debug] GET /login --> github.com/itslaves/rentalgames-server/auth.LoginView (4 handlers)
[GIN-debug] GET /auth/callback --> github.com/itslaves/rentalgames-server/auth.Authenticate (4 handlers)
[GIN-debug] GET /logout --> github.com/itslaves/rentalgames-server/route.Route.func1 (4 handlers)
[GIN-debug] GET /kakao --> github.com/itslaves/rentalgames-server/route.Route.func2 (4 handlers)
[GIN-debug] GET /kakao-user --> github.com/itslaves/rentalgames-server/route.Route.func3 (4 handlers)
[GIN-debug] GET /index --> github.com/itslaves/rentalgames-server/route.Route.func4 (4 handlers)
[GIN-debug] GET /articles --> github.com/itslaves/rentalgames-server/article.Retrieve (4 handlers)
[GIN-debug] POST /articles --> github.com/itslaves/rentalgames-server/article.Create (4 handlers)
[GIN-debug] PUT /articles/:id --> github.com/itslaves/rentalgames-server/article.Update (4 handlers)
[GIN-debug] GET /ping --> github.com/itslaves/rentalgames-server/route.Route.func5 (4 handlers)
[GIN-debug] Listening and serving HTTP on :8888
cobra, viper 를 활용하여 CLI 기능을 적용했습니다.
Resolves https://github.com/itslaves/rentalgames-server/issues/6