Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.94 KB

contributing.md

File metadata and controls

52 lines (34 loc) · 1.94 KB

Contributing

Table of content

  1. Setup
  2. Commands available
  3. Guidelines

Setup

Using VSCode and Docker

That should be easier and better than a local setup, although it might use more memory if you're not on Linux.

  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 👍

Locally

Install Go, Docker and Git; then:

go mod download

And finally install golangci-lint.

You might want to use an editor such as Visual Studio Code with the Go extension.

Build and Run

go build -o app cmd/updater/main.go
./app

Commands available

  • Test the code: go test ./...
  • Lint the code golangci-lint run
  • Build the Docker image (tests and lint included): docker build -t qmcgaw/ddns-updater .
  • Run the Docker container: docker run -it --rm -v /yourpath/data:/updater/data qmcgaw/ddns-updater

Guidelines

The Go code is in the Go file cmd/updater/main.go and the internal directory, you might want to start reading the main.go file.

See the Contributing document for more information on how to contribute to this repository.