当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
0 Star 0 Fork 0

zoe / httplog
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 716 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"flag"
"net/http"
"os/exec"
"gitee.com/zzoe/httplog/backend/routes"
"golang.org/x/text/encoding"
"golang.org/x/text/encoding/simplifiedchinese"
"golang.org/x/text/encoding/unicode"
)
func main() {
var fencStr = flag.String("fenc", "UTF8", "FileEncoding: GB18030/GBK/UTF8(Default)")
var fenc encoding.Encoding
flag.Parse()
switch *fencStr {
case "GB18030":
fenc = simplifiedchinese.GB18030
case "GBK":
fenc = simplifiedchinese.GBK
default:
fenc = unicode.UTF8
}
routes.RegistRouter(fenc)
url := "http://127.0.0.1:21188/"
exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
http.ListenAndServe(":21188", nil)
}
Go
1
https://gitee.com/zzoe/httplog.git
git@gitee.com:zzoe/httplog.git
zzoe
httplog
httplog
b9a802f88207

搜索帮助