Skip to content

Commit

Permalink
1. 去除无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
xr1627119275 committed Jan 13, 2021
1 parent 0bb88b4 commit f012f9e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ func getInfo() (size int64, data string) {
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)

//var data []map[string]string
//json.Unmarshal(body, &data)

data = string(body)
fmt.Println(data)
r := regexp.MustCompile(`\"size\":(.+?),`)
Expand All @@ -52,15 +49,10 @@ func main() {
var size, data = getInfo()
if os.Getenv("Mode") != "dev" {
CheckUpdate(size)
//HideConsole()
}
mux := http.NewServeMux()
box := packr.NewBox("./html")
//mux.Handle("/", http.FileServer(http.Dir("html")))
mux.Handle("/", http.FileServer(box))
//mux.HandleFunc("/ajax", func(writer http.ResponseWriter, request *http.Request) {
// writer.Write([]byte("bye bye ,this is v3 httpServer"))
//})

ln, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
Expand Down Expand Up @@ -118,7 +110,5 @@ func main() {
"</body" +
"></html>")

//ui.Load(fmt.Sprintf("http://%s", ln.Addr()))

<-ui.Done()
}

0 comments on commit f012f9e

Please sign in to comment.