https://github.com/grackleclub/go-run
go live reload - automatically restart Go upon file changes
https://github.com/grackleclub/go-run
bash frontend go
Last synced: about 2 months ago
JSON representation
go live reload - automatically restart Go upon file changes
- Host: GitHub
- URL: https://github.com/grackleclub/go-run
- Owner: grackleclub
- License: mit
- Created: 2025-02-08T17:04:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T21:17:54.000Z (over 1 year ago)
- Last Synced: 2025-05-15T03:11:26.537Z (about 1 year ago)
- Topics: bash, frontend, go
- Language: Shell
- Homepage:
- Size: 1.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-run
`go-run` is a simple bash script that monitors for file change and reloads automatically.
While live-reload tools in the code editor work great for rendering plain `html`+`css`, Go projects utilizing templates require tedious manual reloading. `go-run` automates this.
[](https://github.com/grackleclub/go-run/actions/workflows/shellcheck.yml) [](https://github.com/grackleclub/go-run/actions/workflows/version.yml)
## Features
- accepts arbitrary arguments and passes them through
- lists detected file changes
- stops upon program termination or signal interrupt
- preserves exit codes in all scenarios
## Getting Started on Linux
Copy the file and give it permission to run:
```sh
curl -o go-run https://raw.githubusercontent.com/grackleclub/go-run/refs/heads/main/go-run
```
Make the script executable:
```sh
chmod +x go-run
```
Make the script globally executable (optional):
```sh
sudo mv go-run /usr/local/bin
```
Verify installation:
```sh
go-run version
```
> [!TIP]
> `go-run` can be scoped to the project, and optimally kept in a `bin` directory, consolidated with other tools, so that it may be run as `bin/go-run`. Use the optional step of moving the script to `/usr/local/bin` to make `go-run` directly executable from anywhere.
## Demo and Testing Options
Demo the project using the [example](./example/) module:

## Updating
Run `go-run update` to update:

## Feedback
😎 Open a [pull request](https://github.com/grackleclub/go-run/pulls)!