Monitoring changes in the source file and automatically compile and run (restart).

dogo

Build Status Coverage License

Monitoring changes in the source file and automatically compile and run (restart).

中文

Install

go get github.com/liudng/dogo

Create config

Here's a config file sample, save the file as dogo.json:

{
    "WorkingDir": "{GOPATH}/src/github.com/liudng/dogo/example",
    "SourceDir": [
        "{GOPATH}/src/github.com/liudng/dogo/example"
    ],
    "SourceExt": [".c", ".cpp", ".go", ".h"],
    "BuildCmd": "go build github.com/liudng/dogo/example",
    "RunCmd": "example.exe",
    "Decreasing": 1
}

WorkingDir: working directory, dogo will auto change to this directory.

SourceDir: the list of source directories.

SourceExt: monitoring file type.

BuildCmd: the command of build and compile.

RunCmd: the program (full) path.

Decreasing: Ignore the number of modifies, it's only start counting after build success. Now it's supported in linux and windows.

Start monitoring

type the command to start:

dogo

or, specify a config file with -c

dogo -c=/path/to/dogo.json

the path can contain {GOPATH}.

screen capture

windows screen

Comments
  • Deleting source file causes infinite error

    Deleting source file causes infinite error

    Hi, "dogo" is really simplifying my workflow, thank you guys for creating and maintaining this utility but one thing makes me sad sometimes.

    Let's say I have the following scenario:

    1. Create new file(let's say "test.go")
    2. Start "dogo"
    3. Remove file

    In result "dogo" will constantly log: stat %filepath%: no such file or directory and I need to restart in order to continue the auto build. I'm using the latest version on OS X El Capitan by the way.

  • Exlude directories option

    Exlude directories option

    Is it possible to exclude certain directories? We have a node_modules directory and a vendor directory and these have a lot of files. Even putting a file extension as .go doensn't do much help.

  • use DelayTime instead of Decreasing

    use DelayTime instead of Decreasing

    I use sublime to edit my file. After I press ctr+s, sublime will format my file and save it again. dogo will get two modify events and trigger 2 build and run. (because my app is web, it will report port is used error) If dogo delay 0.5 second to build and run, there will be no such issue. Maybe we don't need decreasing but just increase DelayTime, then we will not ignore any change.

  • Runcmd is launched with wrong working dir

    Runcmd is launched with wrong working dir

    Executable file should have working dir set to filepath.dir("[runcmd command]"). Why exist both "WorkingDir" and "SourceDir" if they must have the same value? I use "go install" as build command and wouldn't want to switch to an arbitrary build. (apart from issue it'a very useful utility)

  • Added support for ignored files and folders. See issue #17

    Added support for ignored files and folders. See issue #17

    Just added Ignored field to JSON configuration and the Dogo struct to deal with ignored folders and files under the ignored folders.

    If the resource being checked is a folder it is just skipped from adding to the Dogo.sourceDir. All subsequent files under that directory are also ignored.

    I think it would have been easier to use map[string]string for the Dogo.Ignored field to perform a 1:1 search but I think it's easier to write only an array of files/folders in the JSON file.

  • using with code generation causes looping behavior

    using with code generation causes looping behavior

    In my project, I am using a Makefile that causes code generation. The build command, thus results in new .go files being created/changed, which triggers dogo to restart the build process, and now it starts looping. I think listening for changes should be paused until the build commend process exits.

Automatically creates Debian packaging for Go packages

dh-make-golang is a tool to automatically create Debian packaging for Go packages. Its goal is to automate away as much of the work as possible when c

Nov 25, 2022
EGo lets you build, debug und run Go apps on Intel SGX - as simple as conventional Go programming!

EGo is a framework for building confidential apps in Go. Confidential apps run in always-encrypted and verifiable enclaves on Intel SGX-enabled ha

Dec 28, 2022
run/stop goroutines/tasks securely, recursively

grunner - run/stop goroutines/tasks securely, recursively. s1 := grunner.New() s1.Defer(func() { fmt.Println("s1 stopped 2") }) s1.Defer(func() {

Apr 22, 2022
Build and (re)start go web apps after saving/creating/deleting source files.

unmaintained Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web f

Jan 2, 2023
KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes.
KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes.

What is Kintohub? KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes. Build your cod

Jun 7, 2022
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.

gowatch 中文文档 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file. Installation To insta

Dec 30, 2022
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Jan 6, 2023
Various tools for usage with Golang like installer, github tool and cloud features.

Gopei2 (Go Programming Environment Installer) Gopei shell install Go compiler, LiteIDE and configure for you the entire environment, variables, paths,

Dec 23, 2022
a build tool for Go, with a focus on cross-compiling, packaging and deployment

goxc NOTE: goxc has long been in maintenance mode. Ever since Go1.5 supported simple cross-compilation, this tool lost much of its value. There are st

Dec 9, 2022
An extremely fast JavaScript bundler and minifier
An extremely fast JavaScript bundler and minifier

An extremely fast JavaScript bundler and minifier

Jan 4, 2023
GoReleaser builds Go binaries as fast and easily as possible
GoReleaser builds  Go binaries as fast and easily as possible

GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.

Jan 7, 2023
Build system and task runner for Go projects
Build system and task runner for Go projects

Gilbert is task runner that aims to provide declarative way to define and run tasks like in other projects like Gradle, Maven and etc.

Dec 21, 2022
A small utility that aims to automate and simplify some tasks related to software release cycles.

Stork is a small utility that aims to automate and simplify some tasks related to software release cycles such as reading the current version from a f

Nov 9, 2022
NFPM is Not FPM - a simple deb, rpm and apk packager written in Go

NFPM NFPM is Not FPM - a simple deb, rpm and apk packager written in Go. Why While fpm is great, for me, it is a bummer that it depends on ruby, tar a

Jan 1, 2023
Moldy CLI the best project starter and manager of the world
Moldy CLI the best project starter and manager of the world

Moldy The best project starter of the world ?? What is Moldy ? Hey I present Moldy this beautiful tool that will solve your life in creating, managing

Oct 17, 2022
Monitoring changes in the source file and automatically compile and run (restart).
Monitoring changes in the source file and automatically compile and run (restart).

dogo Monitoring changes in the source file and automatically compile and run (restart). 中文 Install go get github.com/liudng/dogo Create config Here's

Dec 28, 2022
A program to build, run, and restart a Go program on code change

devrun A program to build, run, and restart a Go program on code change. It also supports watching all your Go imports too. So if you change the code

Apr 4, 2022
ChangeTower is intended to help you watch changes in webpages and get notified of any changes written in Go

ChangeTower is intended to help you watch changes in webpages and get notified of any changes written in Go

Nov 17, 2022