Browse Source

don't rename package without need.

Stephen McQuay 5 years ago
parent
commit
fd53d3e51e
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      botserv/main.go

+ 9
- 9
botserv/main.go View File

@@ -10,7 +10,7 @@ import (
10 10
 	"runtime/pprof"
11 11
 	"time"
12 12
 
13
-	hbserver "bitbucket.org/hackerbots/server"
13
+	"bitbucket.org/hackerbots/server"
14 14
 	"code.google.com/p/go.net/websocket"
15 15
 )
16 16
 
@@ -42,23 +42,23 @@ func main() {
42 42
 		log.Println("serving profile info at http://localhost:8667/debug/pprof/")
43 43
 	}
44 44
 
45
-	conf, err := hbserver.LoadConfig(*config)
45
+	conf, err := server.LoadConfig(*config)
46 46
 	if err != nil {
47 47
 		log.Fatal(err)
48 48
 	}
49 49
 
50 50
 	sm := http.NewServeMux()
51 51
 
52
-	c := hbserver.NewController(conf, *mprofile, *profile)
52
+	c := server.NewController(conf, *mprofile, *profile)
53 53
 	go c.Run()
54 54
 
55
-	sm.Handle("/", hbserver.JsonHandler(c.Index))
55
+	sm.Handle("/", server.JsonHandler(c.Index))
56 56
 	sm.Handle("/ws/", websocket.Handler(c.AddPlayer))
57
-	sm.Handle("/game/start/", hbserver.JsonHandler(c.StartGame))
58
-	sm.Handle("/game/list/", hbserver.JsonHandler(c.ListGames))
59
-	sm.Handle("/game/stats/", hbserver.JsonHandler(c.GameStats))
60
-	sm.Handle("/game/bw/", hbserver.JsonHandler(c.BW))
61
-	sm.Handle("/game/stop/", hbserver.JsonHandler(c.StopGame))
57
+	sm.Handle("/game/start/", server.JsonHandler(c.StartGame))
58
+	sm.Handle("/game/list/", server.JsonHandler(c.ListGames))
59
+	sm.Handle("/game/stats/", server.JsonHandler(c.GameStats))
60
+	sm.Handle("/game/bw/", server.JsonHandler(c.BW))
61
+	sm.Handle("/game/stop/", server.JsonHandler(c.StopGame))
62 62
 	sm.HandleFunc("/fuck/shit/up/", c.KillServer)
63 63
 
64 64
 	err = http.ListenAndServe(*addr, sm)

Loading…
Cancel
Save