CiroLee / bf-go

cli bf implemented by go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bf-go

cli bf implemented by go

develop

# clone repo
git clone https://github.com/CiroLee/bf-go

# install pkg
cd yourpath/bf-go
go mod download

# dev
go run xxx/main.go -from en -to zh hello

# output 
# - from: en to: zh
# - 你好

ps:

  • different from bf, command args must be placed first
  • the repo doesn't give config.go file. config is used to save appid and key which are for baidu translate api. you can use your onwn config. the structure follows:
# config/config.go

package config

type secrets struct {
	Appid string
	Key   string
}

var Secrets = secrets{
	Appid: "xxxxx",
	Key:   "xxxx",
}

About

cli bf implemented by go

License:MIT License


Languages

Language:Go 100.0%