mirror of
https://github.com/donl/gPanel.git
synced 2026-06-30 06:12:06 -06:00
refactor New functions slightly
This commit is contained in:
parent
39708bf2b7
commit
86454f35d3
2 changed files with 7 additions and 11 deletions
|
|
@ -16,12 +16,10 @@ type privateHost struct {
|
|||
}
|
||||
|
||||
func NewPrivateHost() privateHost {
|
||||
priv := privateHost{}
|
||||
|
||||
priv.Auth = 1 // Handle Auth
|
||||
priv.Directory = "private/"
|
||||
|
||||
return priv
|
||||
return privateHost{
|
||||
Auth: 1,
|
||||
Directory: "private/",
|
||||
}
|
||||
}
|
||||
|
||||
func (priv *privateHost) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,9 @@ type publicWeb struct {
|
|||
}
|
||||
|
||||
func NewPublicWeb() publicWeb {
|
||||
pub := publicWeb{}
|
||||
|
||||
pub.Directory = "public/"
|
||||
|
||||
return pub
|
||||
return publicWeb{
|
||||
Directory: "public/",
|
||||
}
|
||||
}
|
||||
|
||||
func (pub *publicWeb) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue