remove unused param

master
bel 2020-03-12 00:57:25 +00:00
parent 7c70ba27cb
commit f8b5eb71e0
2 changed files with 7 additions and 10 deletions

View File

@ -8,13 +8,12 @@ import (
)
var (
Port string
StoreType string
StoreAddr string
StoreUser string
StorePass string
Root string
MyTinyTodo string
Port string
StoreType string
StoreAddr string
StoreUser string
StorePass string
Root string
)
func init() {
@ -32,7 +31,6 @@ func Refresh() {
as.Append(args.STRING, "storeaddr", "addr of store", "")
as.Append(args.STRING, "storeuser", "user of store", "")
as.Append(args.STRING, "storepass", "pass of store", "")
as.Append(args.STRING, "mtt", "url of php server", "http://localhost:38808")
as.Append(args.STRING, "root", "root of static files", "./public")
if err := as.Parse(); err != nil {
panic(err)
@ -44,5 +42,4 @@ func Refresh() {
StoreUser = as.Get("storeuser").GetString()
StorePass = as.Get("storepass").GetString()
Root = as.Get("root").GetString()
MyTinyTodo = as.Get("mtt").GetString()
}

View File

@ -96,7 +96,7 @@ func (s *Server) phpProxy(w http.ResponseWriter, r *http.Request) {
s.static(w, r)
return
}
url, err := url.Parse(config.MyTinyTodo)
url, err := url.Parse("http://127.0.0.1:64123")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
} else {