{"id":18392456,"url":"https://github.com/marwan-at-work/gowatch","last_synced_at":"2025-04-07T03:34:07.626Z","repository":{"id":57485125,"uuid":"86115674","full_name":"marwan-at-work/gowatch","owner":"marwan-at-work","description":"A simple .go file watcher that will stop \u0026 restart main.go","archived":false,"fork":false,"pushed_at":"2024-11-23T19:22:43.000Z","size":668,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T12:24:29.885Z","etag":null,"topics":["filewatcher","fsnotify","go","golang","nodemon"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marwan-at-work.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-24T22:29:53.000Z","updated_at":"2024-12-24T21:26:15.000Z","dependencies_parsed_at":"2023-01-22T01:57:29.470Z","dependency_job_id":"802fd6b8-61d6-4ba1-ba71-7883d9325f40","html_url":"https://github.com/marwan-at-work/gowatch","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marwan-at-work%2Fgowatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marwan-at-work%2Fgowatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marwan-at-work%2Fgowatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marwan-at-work%2Fgowatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marwan-at-work","download_url":"https://codeload.github.com/marwan-at-work/gowatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589696,"owners_count":20963022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filewatcher","fsnotify","go","golang","nodemon"],"created_at":"2024-11-06T01:56:55.054Z","updated_at":"2025-04-07T03:34:07.253Z","avatar_url":"https://github.com/marwan-at-work.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/16294261/204098353-e8042b8c-3f3c-43e4-9974-86274abb634b.png\" width=\"200\" /\u003e\n\nA simple Go file watcher that will stop \u0026 restart your `main()` function on file changes.\n\n## Motivation\n\nI just want to stop my server, and run it again every time I save a file.\n\n## installation\n\n`go install marwan.io/gowatch@latest`\n\n## Usage\nfrom your main app directory, run `gowatch`\n\n## What it does\n\nit reads your current working directory and runs the two typical commands:\n\n- `go build`\n\n- `./\u003cname-of-compiled-binary\u003e`\n\nSo this only works in `main` packages.\n\nAlso, this ignores your `vendor` folder \u0026 your `_test.go` files.\n\n#### FAQ\n\nQ: Why doesn't it just run `go run main.go`?\n\nA: `go run` does the same thing as `go build`, but calls the resulting binary as a subprocess. This makes it harder to reach `stdout` and killing the `main.go` process, won't necessarily kill the subprocess, so you end up trying to run the server twice (which ends up with \"port is already taken\" kind of error).\n\nQ: How does it compare with other tools?\n\nA: I haven't tried most of them, but I wanted to make this as simple as just running one command to get what I'm looking for without having to turn and twist a lot of knobs. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarwan-at-work%2Fgowatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarwan-at-work%2Fgowatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarwan-at-work%2Fgowatch/lists"}