# README
devtool
介绍
devtool 是一个强大的Cli工具,其中包含了日常开发中的一些可能涉及到的高频工具,这里避免重复造轮子,所以一般就是日常用的一些工具但是市场上没有符合自己需求的,得自己写!
➜ devtool --help
Usage: devtool [OPTIONS] COMMAND
Commands:
codec The Encode and Decode data tool
cpp The cpp language tools
curl Send thrift like curl
gen Auto compile thrift、protobuf IDL
git The git tools
go The golang language tools
help Help about any command
hexo The Hexo tool
json The Json tool
proxy Proxy and Capture thrift/http/https requests
run Run task templates
upload File upload tool
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 install
下载
# 注意Go版本大于等于1.18
go install -v github.com/anthony-dong/golang/cli/devtool@latest
# 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