Minimal, well-tested Go library that sums integers. Meant as a template repo showing the repo hygiene (CI, coverage, licensing, ownership) expected of Bobadilla Technologies' Go packages.
The library is the main artifact. The bundled CLI under cmd/sum is a
showcase / internal-testing tool with its own go.mod, so importing this
package never pulls in any CLI-only dependency.
go get github.com/bobadilla-tech/go-packagepackage main
import (
"fmt"
"github.com/bobadilla-tech/go-package"
)
func main() {
fmt.Println(sum.Sum(1, 2, 3)) // 6
}cmd/sum is a thin wrapper around the library, kept in its own Go module so its
dependencies never leak into the library's go.mod:
cd cmd/sum
go run . 1 2 3
# 6