devtool 是一个强大的开发者工具,其中包含了日常开发中的一些可能涉及到的高频工具,比如编解码工具、抓包工具、发送请求工具、代理工具、文件存储工具等!
Name: A collection of development tools
Usage: devtool [OPTIONS] COMMAND
Commands:
codec Tools for encoding and decoding data in various formats
codegen Generate code from IDL files (Thrift, Protobuf)
curl Send Thrift requests similar to cURL
diff Diff utilities for various data formats
git Git related tools and utilities
golang Go language related tools and utilities
help Help about any command
hexo Hexo static site generator tools
mock Generate mock data for various formats
proxy HTTP/HTTPS, Thrift, and FileSystem proxy tools
run Run tasks defined in template files
static Serve static files
strace Trace system calls and signals
tcp TCP related tools
trimer Trim or filter data from various formats
upload File upload utility
wal Commands for interacting with Write-Ahead Log (WAL) files
Options:
--config-file string Set the config file
-h, --help help for devtool
--log-level string Set the log level in [debug|info|notice|warn|error] (default "info")
-v, --verbose Turn on verbose mode
--version version for devtool
Use "devtool COMMAND --help" for more information about a command.
To get more help with devtool, check out our guides at https://github.com/anthony-dong/golang
# 注意Go版本大于等于1.18
CGO_ENABLED=1 go install -v github.com/anthony-dong/golang/cli/devtool@latest
备注:由于依赖了 libpcap,如果执行失败请执行以下命令
# 1. update
sudo apt update
# 2. install
sudo apt-get install -y libpcap-dev
优先级顺序:
- 读取
--config-file
参数传递的配置文件地址 - 读取
$(pwd)/.devtool.yaml
- 读取
dirname($0)/.devtool.yaml
- 读取
$HOME/.devtool/config.yaml
类型定义:config.go