mirror of
https://github.com/swissgeo/tool-golang-public.git
synced 2026-10-18 20:45:18 +00:00
Read-only mirror of https://github.com/swissgeo/tool-golang-public — SWISSGEO. Issues & pull requests at the source.
- Go 94.2%
- Makefile 5.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| .vscode | ||
| aws-ssm | ||
| codebuild | ||
| e2e-tests | ||
| k8s-validate | ||
| lib | ||
| .dockerignore | ||
| .gitignore | ||
| .golangci.yaml | ||
| Dockerfile.in | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| Makefile | ||
| README.md | ||
Golang CLI Tools for SWISSGEO
| Branch | Status | Coverage |
|---|---|---|
| main |
This repository contains CLI tools written in golang to manage SWISSGEO services and infrastructure. It is also used to manage the legacy BGDI services and infrastructure and has been ported from https://github.com/geoadmin/tool-golang-bgdi.
- Repository structure
- Naming convention
- Formatting and linting
- Create new application skeleton
- CLI commands
Repository structure
tool-golang-public
|-- TOOL_NAME
. |-- main.go
|-- README.md
|-- cmd
|-- root.go
Naming convention
TOOL_NAME should be in kebab case
Formatting and linting
Code should be formatted with goimports and linted with golangci-lint
goimports -w .
golangci-lint run
To simplify the linting and formatting a makefile is available
make format
make lint
Create new application skeleton
go install github.com/spf13/cobra-cli@latest
cobra-cli init <app-name>
CLI commands
See individual directories for the documentation of the respective command.