百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

goemon

> DevOps
开源

五右卫门

182 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

五右卫门

goemon

Go Extensible Monitoring

Speed up your development. If you updated js files, the page should be reloaded. If you updated go files, the app should be recompiled, and should be restarted. And also, the page should be reloaded

Expected directory structure

+---assets
|   +- index.html
|   +- app.css
|   +- app.js
+- main.go

Usage

For example:

Run web server

$ goemon -g > goemon.yml
$ goemon go run main.go

Writing markdown

$ goemon -g md > goemon.yml
$ goemon --

Writing C code

$ goemon -g c > goemon.yml
$ goemon --

Default configuration

yaml
# Generated by goemon -g
livereload: :35730
tasks:
- match: './assets/*.js'
  commands:
  - minifyjs -m -i ${GOEMON_TARGET_FILE} > ${GOEMON_TARGET_DIR}/${GOEMON_TARGET_NAME}.min.js
  - :livereload /
- match: './assets/*.css'
  commands:
  - :livereload /
- match: './assets/*.html'
  commands:
  - :livereload /
- match: '*.go'
  commands:
  - go build
  - :restart
  - :livereload /
  • match is wildcard. You can use ./foo/bar/**/*.js like a shell.
  • commands is list of commands to run. :XXX is internal command.
Internal Command Behavior
:livereload /path reload path
:minify minify js/css(work in progress)
:restart restart app
:sleep 3000 sleep 3000ms
:fizzbuzz 100 do fizzbuzz(1 to 100)
:event :Foo fire event :Foo

:event :Foo fire event defined - match: :Foo.

Currently, :minify is work in progress. So you should run minifyjs command to do it. For example, configuration in above works as below.

Pattern Behavior
./assets/*.css reload page
./assets/*.js minify js/css, reload page
./assets/*.html reload page
./assets/*.go build, restart app, reload page

LiveReload

You can use livereload feature.

xml

  
  

  

  

  Your App

  

Use goemon as library

cat > goemon.go
package main

import (
	_ "github.com/mattn/goemon/auto"
)
^D

Then go build. You don't need to use goemon command.

Installation

$ go get github.com/mattn/goemon/cmd/goemon

If you want to minify js, install minifyjs like below.

$ npm install -g minifyjs

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godevopsgo

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理