wego

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2017 License: MIT Imports: 17 Imported by: 0

README

wego

Build Status Go Report Card

屏蔽字过滤服务

用法
  1. https://github.com/goofansu/wego/releases 下载对应自己系统的版本,目前仅编译了linux和macOS版本
  2. tar zxf wego-osx-1.0.0.tar.gz
  3. ./wego (默认8000端口,可以使用./wego -port 1234修改监听端口)

运行情况如下:

$ ./wego -dict.path /tmp/*.txt
Version    : 1.1.0-1-g4345260
Git Hash   : a0bb954eeb2c277498b03da247bfe28625a5a2a9
Build Time : 2016-12-14T11:30:27Z
载入sego词典 /tmp/dict1.txt
载入sego词典 /tmp/dict2.txt
sego词典载入完毕
Listening at 8000
[GIN] 2016/12/15 - 15:45:46 | 200 |     148.311µs | 127.0.0.1 |   POST    /filter
[GIN] 2016/12/15 - 15:46:18 | 200 |      93.437µs | 127.0.0.1 |   GET    /validate
客户端如何调用?
  1. 验证是否包含屏蔽字
curl -XPOST http://localhost:8000/validate -d "message=测试封杀"
{"result":false}
  1. 过滤掉屏蔽字,以*号代替
curl -XPOST http://localhost:8000/filter -d "message=测试封杀"
{"result":"测试**"}
字典
Todo
  • http
  • gRPC

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL