A simple build and dependency management tool for Go, offering multiple build profiles and enhanced workflows for developers
go get -u github.com/LezGo/lezgolezgo [command]LezGo uses a configuration file named lezgo.yml to manage build profiles and dependencies. The configuration file should be placed in the root directory of the project.
name: my_project
author: <your_name>
entrypoint: main.go
version: 0.1.0
profiles:
debug:
flags: ["-gcflags", "all=-N -l"]
env:
GO_ENV: debug
output: ./bin/debug/
tags: ["debug"]
ldflags: ""
release:
flags: ["-ldflags", "-s -w"]
env:
GO_ENV: production
output: ./bin/release/
tags: ["release"]
ldflags: "-X main.version=1.0.0"LezGo supports cross-compilation by specifying the target platform and architecture in the configuration file directly on a build profile. By passing the flag --cross-compilation or -c, LezGo will build the project for the target platform and architecture specified in the configuration file.
# Cross-compilation
profiles:
debug:
flags: ["-gcflags", "all=-N -l"]
env:
GO_ENV: debug
output: ./bin/debug/
tags: ["debug"]
os-target: linux
arch: amd64init- Initialize a new LezGo projectbuild- Build the project
--cross-compilationor-c- Build the project for the target platform and architecture specified in the configuration file--profileor-p- Specify the build profile to use