From 72d0843ff86b52356a9dbd9ae2eb0cdec6df6092 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Wed, 23 Apr 2014 14:28:13 -0700 Subject: [PATCH] Renamed package/directory --- botserv/main.go | 18 +++++++++--------- config.go | 2 +- control.go | 6 +++--- deathmatch.go | 2 +- doc.go | 4 ++-- game.go | 2 +- id.go | 2 +- id_test.go | 2 +- melee.go | 2 +- obstacle.go | 2 +- player.go | 2 +- projectile.go | 2 +- protocol.go | 2 +- robot.go | 2 +- robot_test.go | 2 +- splosion.go | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/botserv/main.go b/botserv/main.go index 69b5497..fbff1c7 100644 --- a/botserv/main.go +++ b/botserv/main.go @@ -10,7 +10,7 @@ import ( "runtime/pprof" "time" - "bitbucket.org/hackerbots/botserv" + hbserver "bitbucket.org/hackerbots/server" "code.google.com/p/go.net/websocket" ) @@ -42,23 +42,23 @@ func main() { log.Println("serving profile info at http://localhost:8667/debug/pprof/") } - conf, err := botserv.LoadConfig(*config) + conf, err := hbserver.LoadConfig(*config) if err != nil { log.Fatal(err) } sm := http.NewServeMux() - c := botserv.NewController(conf, *mprofile, *profile) + c := hbserver.NewController(conf, *mprofile, *profile) go c.Run() - sm.Handle("/", botserv.JsonHandler(c.Index)) + sm.Handle("/", hbserver.JsonHandler(c.Index)) sm.Handle("/ws/", websocket.Handler(c.AddPlayer)) - sm.Handle("/game/start/", botserv.JsonHandler(c.StartGame)) - sm.Handle("/game/list/", botserv.JsonHandler(c.ListGames)) - sm.Handle("/game/stats/", botserv.JsonHandler(c.GameStats)) - sm.Handle("/game/bw/", botserv.JsonHandler(c.BW)) - sm.Handle("/game/stop/", botserv.JsonHandler(c.StopGame)) + sm.Handle("/game/start/", hbserver.JsonHandler(c.StartGame)) + sm.Handle("/game/list/", hbserver.JsonHandler(c.ListGames)) + sm.Handle("/game/stats/", hbserver.JsonHandler(c.GameStats)) + sm.Handle("/game/bw/", hbserver.JsonHandler(c.BW)) + sm.Handle("/game/stop/", hbserver.JsonHandler(c.StopGame)) sm.HandleFunc("/fuck/shit/up/", c.KillServer) err = http.ListenAndServe(*addr, sm) diff --git a/config.go b/config.go index 0d8b4ec..8d91a2f 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "encoding/json" diff --git a/control.go b/control.go index 0cb5043..2f9d2fb 100644 --- a/control.go +++ b/control.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "encoding/json" @@ -24,7 +24,7 @@ func (h JsonHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } // Controller is the shepherd of a collection of games. The main package in -// botserv simply populates one of these and starts an http server. +// server simply populates one of these and starts an http server. type Controller struct { Idg *IdGenerator Conf Config @@ -247,7 +247,7 @@ func (c *Controller) StopGame(w http.ResponseWriter, req *http.Request) { log.Printf("returning from StopGame") } -// KillServer is my favorite method of all the methods in botserv: it shuts +// KillServer is my favorite method of all the methods in server: it shuts // things down respecting profiling requests. func (c *Controller) KillServer(w http.ResponseWriter, req *http.Request) { if c.Profile != "" { diff --git a/deathmatch.go b/deathmatch.go index d323602..af27f46 100644 --- a/deathmatch.go +++ b/deathmatch.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/doc.go b/doc.go index 43053d6..ea656c0 100644 --- a/doc.go +++ b/doc.go @@ -1,3 +1,3 @@ -// botserv is the collection of structs and functions used to implement +// server is the collection of structs and functions used to implement // a hackerbots server -package botserv +package server diff --git a/game.go b/game.go index 58d9ab0..decb270 100644 --- a/game.go +++ b/game.go @@ -1,4 +1,4 @@ -package botserv +package server // delete me diff --git a/id.go b/id.go index 5b82e51..f6bf294 100644 --- a/id.go +++ b/id.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "crypto/md5" diff --git a/id_test.go b/id_test.go index 5c7f893..24b4bf2 100644 --- a/id_test.go +++ b/id_test.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "testing" diff --git a/melee.go b/melee.go index 7d37be4..b5cd113 100644 --- a/melee.go +++ b/melee.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/obstacle.go b/obstacle.go index 548804e..150fb6f 100644 --- a/obstacle.go +++ b/obstacle.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "math" diff --git a/player.go b/player.go index 71102f5..04c78a2 100644 --- a/player.go +++ b/player.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "encoding/gob" diff --git a/projectile.go b/projectile.go index 6059c5d..c288d34 100644 --- a/projectile.go +++ b/projectile.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/protocol.go b/protocol.go index 3d97d13..b32b5e8 100644 --- a/protocol.go +++ b/protocol.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/robot.go b/robot.go index 477c8f4..41fd378 100644 --- a/robot.go +++ b/robot.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/robot_test.go b/robot_test.go index dd17ac5..522834c 100644 --- a/robot_test.go +++ b/robot_test.go @@ -1,4 +1,4 @@ -package botserv +package server import ( "log" diff --git a/splosion.go b/splosion.go index fbbfb46..982e9fe 100644 --- a/splosion.go +++ b/splosion.go @@ -1,4 +1,4 @@ -package botserv +package server import ( v "bitbucket.org/hackerbots/vector"