diff --git a/s3imageserver/logger.go b/s3imageserver/logger.go index 3ec4702..a320c0b 100644 --- a/s3imageserver/logger.go +++ b/s3imageserver/logger.go @@ -16,7 +16,7 @@ import ( type ResponseWriter struct { wraps http.ResponseWriter counter int - id uuid.Uuid + id uuid.UUID conf Config } @@ -104,7 +104,7 @@ type HttpTimer struct { } type CallEvent struct { - Id uuid.Uuid + Id uuid.UUID StartTime int64 EndTime int64 Url string @@ -115,7 +115,7 @@ func (s CallEvent) String() string { return fmt.Sprintf("Id: %s, Url: %s, Duration: %dms, Size: %d", s.Id, s.Url, s.EndTime-s.StartTime, s.ResponseSize) } -func (ht *HttpTimer) recordRequest(id uuid.Uuid, url string, from int64) { +func (ht *HttpTimer) recordRequest(id uuid.UUID, url string, from int64) { if ht.conf.Database != "" { conn, err := sql.Open("sqlite3", ht.conf.Database) if err != nil { @@ -132,7 +132,7 @@ func (ht *HttpTimer) recordRequest(id uuid.Uuid, url string, from int64) { } } -func (ht *HttpTimer) completeRequest(id uuid.Uuid, to int64, size int) { +func (ht *HttpTimer) completeRequest(id uuid.UUID, to int64, size int) { if ht.conf.Database != "" { conn, err := sql.Open("sqlite3", ht.conf.Database) if err != nil { diff --git a/s3imageserver/s3imageserver.go b/s3imageserver/s3imageserver.go index 896e088..e644ccc 100644 --- a/s3imageserver/s3imageserver.go +++ b/s3imageserver/s3imageserver.go @@ -20,7 +20,6 @@ import ( "github.com/julienschmidt/httprouter" _ "github.com/mattn/go-sqlite3" - "github.com/twinj/uuid" ) type Config struct { @@ -67,7 +66,6 @@ type HandlerConfig struct { type HandleVerification func(string) bool func Run(verify HandleVerification) (done *sync.WaitGroup, callback chan CallEvent) { - uuid.Init() envArg := flag.String("c", "config.json", "Configuration") flag.Parse() content, err := ioutil.ReadFile(*envArg)