Skip to content

goo-apps/go-auto-build

Repository files navigation

go-auto-build

A pluggable Go package build system using only Go standard libraries. This package can be imported into any static Go project to enable automatic builds after any code change during development.

Features

  • ⚡ Automatic rebuilds on file changes
  • 🔌 Pluggable and easy to integrate
  • 🛠️ Zero external dependencies—uses only Go standard libraries
  • 🚀 Boosts productivity during development

Installation

go get github.com/goo-apps/go-auto-build

Use

cfg := &gobuildwatcher.Config{
  ConfigPath:     "resource.toml",
  OutputBinary:   "build/myapp",
  InstallPath:    "/usr/local/bin/myapp",
  PollInterval:   2,
  WatchExt:       ".go,.json",
  ProjectRoot:    ".",
  EnableLogging:  true,
  PostBuildMove:  false,
  BuildCommand:   "build -o build/myapp",
}

watcher := gobuildwatcher.NewWatcher(cfg)
go watcher.Start() // runs in background
// select {}          // block forever

About

A pluggable go package build with go standard libraries, which can be imported to any static project for auto build after any change of the code during development.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages