Skip to content

qdm12/golibs

Repository files navigation

Experimental Go libraries

When a Go library has a stable API and is useful across multiple projects, I extract it from this repository as a standalone repository.

Build status GitHub last commit GitHub commit activity GitHub issues

Setup

go get github.com/qdm12/golibs

Development

  1. Setup your environment

    Using VSCode and Docker (easier)

    1. Install Docker
      • On Windows, share a drive with Docker Desktop and have the project on that partition
      • On OSX, share your project directory with Docker Desktop
    2. With Visual Studio Code, install the remote containers extension
    3. In Visual Studio Code, press on F1 and select Remote-Containers: Open Folder in Container...
    4. Your dev environment is ready to go!... and it's running in a container 👍 So you can discard it and update it easily!

    Locally

    1. Install Go, Docker and Git

    2. Install Go dependencies with

      go mod download
    3. Install golangci-lint

    4. You might want to use an editor such as Visual Studio Code with the Go extension. Working settings are already in .vscode/settings.json.

  2. Commands available:

    # Lint the code
    golangci-lint run
    # Test the code
    go test ./...
    # Regenerate mocks for tests
    go generate -run "mockgen" ./...
    # Tidy modules dependencies
    go mod tidy
    # Run the CI steps with different Docker build targets:
    docker build --target lint .
    docker build --target test .
    docker build --target tidy .
  3. See Contributing for more information on how to contribute to this repository.

License

This repository is under an MIT license

About

Experimental Go libraries for my own projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published