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

Overview

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.

    enhancement 
    opened by G07cha 3
  • 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.

    enhancement 
    opened by pyrossh 2
  • 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.

    opened by zhangpy 2
  • 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)

    opened by simobgl 1
  • 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.

    opened by samacs 4
  • 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.

    opened by jvsteiner 0
Releases(1.0_beta2)
Owner
null
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

The Universal OS 334 Sep 21, 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

Edgeless Systems GmbH 339 Sep 21, 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() {

vogo 0 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

Andrea Franz 3.4k Sep 22, 2022
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

KintoHub 30 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 中文文档 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

silenceper 722 Sep 21, 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.

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

Oxequa 4.3k Sep 21, 2022
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,

George Calianu 99 Sep 20, 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

Am Laher 1.7k Sep 19, 2022
An extremely fast JavaScript bundler and minifier

An extremely fast JavaScript bundler and minifier

Evan Wallace 33.4k Oct 1, 2022
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.

GoReleaser 10.7k Sep 30, 2022
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.

Gilbert 104 Sep 26, 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

Simone Margaritelli 42 Sep 21, 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

GoReleaser 1.6k Sep 27, 2022
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

Moldy Community 24 Aug 22, 2022
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

null 252 Sep 27, 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

Kevin Darlington 19 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

The Cats 32 Jul 6, 2022