update README

This commit is contained in:
wasd 2018-09-30 00:49:40 +08:00
parent e63280ed64
commit c295ac96a7
2 changed files with 21 additions and 11 deletions

View File

@ -14,9 +14,9 @@
- [mysql](#mysql)
- [Redis](#redis)
- [Http](#http)
- Mongodb 开发中...
- Fast-cgi
- GRPC
- [Mongodb](#mongodb)
- Fast-cgi (developing)
- GRPC (developing)
- ...
## Demo:
@ -78,12 +78,6 @@ $ go-sniffer [设备名] mysql [参数]
```
![image](https://github.com/40t/go-sniffer/raw/master/images/mysql.gif)
### http
``` bash
$ go-sniffer [设备名] http [参数]
-p 置顶端口默认80
```
![image](https://github.com/40t/go-sniffer/raw/master/images/http.gif)
### redis
``` bash
$ go-sniffer [设备名] redis [参数]
@ -91,5 +85,19 @@ $ go-sniffer [设备名] redis [参数]
```
![image](https://github.com/40t/go-sniffer/raw/master/images/redis.gif)
### http
``` bash
$ go-sniffer [设备名] http [参数]
-p 置顶端口默认80
```
![image](https://github.com/40t/go-sniffer/raw/master/images/http.gif)
### mongodb
``` bash
$ go-sniffer [设备名] mongodb [参数]
-p 置顶端口默认27017
```
- 支持大部分语句,只有个别少数语句没有实现
## License:
[MIT](http://opensource.org/licenses/MIT)

View File

@ -11,10 +11,12 @@ import (
func GetNowStr(isClient bool) string {
var msg string
layout := "01/02 15:04:05.000000"
msg += time.Now().Format(layout)
if isClient {
msg = time.Now().Format("2006-01-02 15:04:05")+"| cli -> ser |"
msg += "| cli -> ser |"
}else{
msg = time.Now().Format("2006-01-02 15:04:05")+"| ser -> cli |"
msg += "| ser -> cli |"
}
return msg
}