Refractor the project.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
884c88525e
commit
da41214617
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package utils
|
||||
package io
|
||||
|
||||
type BufferedWriter struct {
|
||||
Data []byte
|
@ -1,4 +1,4 @@
|
||||
package utils
|
||||
package io
|
||||
|
||||
type CountingWriter struct {
|
||||
Length int64
|
Loading…
Reference in New Issue
Block a user