Skip to content

Commit

Permalink
update to meet satori's uuid new update
Browse files Browse the repository at this point in the history
  • Loading branch information
abutaha committed Jan 9, 2018
1 parent 712c46d commit 08a4cf6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions aws-es-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,11 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

if p.logtofile {
requestID := fmt.Sprintf("%s", uuid.NewV4().String())

requestID, _ := uuid.NewV4()

reqStruct := &requestStruct{
Requestid: requestID,
Requestid: requestID.String(),
Datetime: time.Now().Format("2006/01/02 15:04:05"),
Remoteaddr: r.RemoteAddr,
Requesturi: ep.RequestURI(),
Expand All @@ -237,7 +238,7 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

respStruct := &responseStruct{
Requestid: requestID,
Requestid: requestID.String(),
Body: string(body.Bytes()),
}

Expand Down Expand Up @@ -326,8 +327,10 @@ func main() {
}

if p.logtofile {
requestFname := fmt.Sprintf("request-%s.log", uuid.NewV4().String())
responseFname := fmt.Sprintf("response-%s.log", uuid.NewV4().String())
u1, _ := uuid.NewV4()
u2, _ := uuid.NewV4()
requestFname := fmt.Sprintf("request-%s.log", u1.String())
responseFname := fmt.Sprintf("response-%s.log", u2.String())

if fileRequest, err = os.Create(requestFname); err != nil {
log.Fatalln(err.Error())
Expand Down
2 changes: 1 addition & 1 deletion cross-compile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION="0.7"
VERSION="0.8"

rm -rf dist; mkdir -p dist
for GOOS in darwin linux windows; do
Expand Down

0 comments on commit 08a4cf6

Please sign in to comment.