在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:lacion/cookiecutter-golang开源软件地址:https://github.com/lacion/cookiecutter-golang开源编程语言:Go 52.2%开源软件介绍:cookiecutter-golangPowered by Cookiecutter, Cookiecutter Golang is a framework for jumpstarting production-ready go projects quickly. Features
Optional Integrations
Constraints
This project now uses docker multistage builds, you need at least docker version v17.05.0-ce to use the docker file in this template, you can read more about multistage builds here. DockerThis template uses docker multistage builds to make images slimmer and containers only the final project binary and assets with no source code whatsoever. You can find the image dokcer file in this repo and more information about docker multistage builds in this blog post. Apps run under non root user and also with dumb-init. UsageLet's pretend you want to create a project called "echoserver". Rather than starting from scratch maybe copying some files and then editing the results to include your name, email, and various configuration issues that always get forgotten until the worst possible moment, get cookiecutter to do all the work. First, get Cookiecutter. Trust me, it's awesome: $ pip install cookiecutter Alternatively, you can install $ brew install cookiecutter Finally, to run it based on this template, type: $ cookiecutter https://github.com/lacion/cookiecutter-golang.git You will be asked about your basic info (name, project name, app name, etc.). This info will be used to customize your new project. Warning: After this point, change 'Luis Morales', 'lacion', etc to your own information. Answer the prompts with your own desired options. For example: full_name [Luis Morales]: Luis Morales
github_username [lacion]: lacion
app_name [mygolangproject]: echoserver
project_short_description [A Golang project.]: Awesome Echo Server
docker_hub_username [lacion]: lacion
docker_image [lacion/docker-alpine:latest]: lacion/docker-alpine:latest
docker_build_image [lacion/docker-alpine:gobuildimage]: lacion/docker-alpine:gobuildimage
use_docker [y]: y
use_git [y]: y
use_logrus_logging [y]: y
use_viper_config [y]: y
use_cobra_cmd [y]: y
Select use_ci:
1 - travis
2 - circle
3 - none
Choose from 1, 2, 3 [1]: 1 Enter the project and take a look around: $ cd echoserver/
$ ls Run $ make help
$ make build
$ ./bin/echoserver Projects build with cookiecutter-golang
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论