Skip to content

lrwx00t/golive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

golive

golive is a tool for real-time Go development, allowing you to watch changes in your go code execution as you make them. It automatically runs your code as you work and keeps everything in sync. It currently provides limited support to go run only for short and long running processes. So golive would be able to handle even processes that don't complete or its completion is unknown e.g. web servers, background jobs or network services.

Whenever a change is detected in the directory, such as an updated or newly added file, the code will be executed automatically. If the execution is successful, the output will be displayed in green, otherwise any errors that occurred will be displayed in red. In all cases, golive is expected to continue running indefinitely until manually terminated by issuing a SIGINT signal e.g. Ctrl + C.

short-running process

image

long-running process

image

Future Note

go run should be replaced in the future by using go build and binary run to capture the actual pid of the process. At this time, golive uses a hack to filter out processes and kill any process that matches the go run process execution except the parent process (golive itself in this case).

Install

go install github.com/lrwx00t/golive

Example

golive --path ~/src/go-dev/playground/demo
2023/02/20 16:25:36 golive started 👀..

# without any arguments, it defaults to current path
golive

Releases

No releases published

Packages

No packages published

Languages