Skip to content

Commit

Permalink
Interal changes due to uuid package changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbreedt committed Jun 7, 2019
1 parent 0952c33 commit 4d4d956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions s3imageserver/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
type ResponseWriter struct {
wraps http.ResponseWriter
counter int
id uuid.Uuid
id uuid.UUID
conf Config
}

Expand Down Expand Up @@ -104,7 +104,7 @@ type HttpTimer struct {
}

type CallEvent struct {
Id uuid.Uuid
Id uuid.UUID
StartTime int64
EndTime int64
Url string
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions s3imageserver/s3imageserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/julienschmidt/httprouter"
_ "github.com/mattn/go-sqlite3"
"github.com/twinj/uuid"
)

type Config struct {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4d4d956

Please sign in to comment.