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 ( var (
Port string Port string
StoreType string StoreType string
StoreAddr string StoreAddr string
StoreUser string StoreUser string
StorePass string StorePass string
Root string Root string
MyTinyTodo string
) )
func init() { func init() {
@ -32,7 +31,6 @@ func Refresh() {
as.Append(args.STRING, "storeaddr", "addr of store", "") as.Append(args.STRING, "storeaddr", "addr of store", "")
as.Append(args.STRING, "storeuser", "user of store", "") as.Append(args.STRING, "storeuser", "user of store", "")
as.Append(args.STRING, "storepass", "pass 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") as.Append(args.STRING, "root", "root of static files", "./public")
if err := as.Parse(); err != nil { if err := as.Parse(); err != nil {
panic(err) panic(err)
@ -44,5 +42,4 @@ func Refresh() {
StoreUser = as.Get("storeuser").GetString() StoreUser = as.Get("storeuser").GetString()
StorePass = as.Get("storepass").GetString() StorePass = as.Get("storepass").GetString()
Root = as.Get("root").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) s.static(w, r)
return return
} }
url, err := url.Parse(config.MyTinyTodo) url, err := url.Parse("http://127.0.0.1:64123")
if err != nil { if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
} else { } else {