diff --git a/pageHandler/go-info-page.go b/pageHandler/go-info-page.go index 96d9bb5..8ee6b95 100644 --- a/pageHandler/go-info-page.go +++ b/pageHandler/go-info-page.go @@ -2,8 +2,8 @@ package pageHandler import ( "golang.captainalm.com/cityuni-webserver/conf" - "golang.captainalm.com/cityuni-webserver/pageHandler/utils" "golang.captainalm.com/cityuni-webserver/utils/info" + "golang.captainalm.com/cityuni-webserver/utils/io" "html/template" "net/url" "os" @@ -85,7 +85,7 @@ func (gipg *goInfoPage) GetContents(urlParameters url.Values) (contentType strin if err != nil { return "text/plain", []byte("Cannot Get Info.\r\n" + err.Error()), false } - theBuffer := &utils.BufferedWriter{} + theBuffer := &io.BufferedWriter{} var regPages []string var cacPages []string env := make([]string, 0) diff --git a/pageHandler/utils/process-preconditions.go b/pageHandler/utils/process-preconditions.go index 2975f50..ccc1e0c 100644 --- a/pageHandler/utils/process-preconditions.go +++ b/pageHandler/utils/process-preconditions.go @@ -1,6 +1,7 @@ package utils import ( + "golang.captainalm.com/cityuni-webserver/utils/io" "mime/multipart" "net/http" "net/textproto" @@ -117,7 +118,7 @@ func ProcessRangePreconditions(maxLength int64, rw http.ResponseWriter, req *htt } func GetMultipartLength(parts []ContentRangeValue, contentType string, maxLength int64) int64 { - cWriter := &CountingWriter{Length: 0} + cWriter := &io.CountingWriter{Length: 0} var returnLength int64 = 0 multWriter := multipart.NewWriter(cWriter) for _, currentPart := range parts { diff --git a/pageHandler/utils/buffered-writer.go b/utils/io/buffered-writer.go similarity index 92% rename from pageHandler/utils/buffered-writer.go rename to utils/io/buffered-writer.go index 4d31a7f..b9f1d9e 100644 --- a/pageHandler/utils/buffered-writer.go +++ b/utils/io/buffered-writer.go @@ -1,4 +1,4 @@ -package utils +package io type BufferedWriter struct { Data []byte diff --git a/pageHandler/utils/counting-writer.go b/utils/io/counting-writer.go similarity index 91% rename from pageHandler/utils/counting-writer.go rename to utils/io/counting-writer.go index 67e8058..152a5b9 100644 --- a/pageHandler/utils/counting-writer.go +++ b/utils/io/counting-writer.go @@ -1,4 +1,4 @@ -package utils +package io type CountingWriter struct { Length int64