Unified · Split
| @@ -10,13 +10,13 @@ · 9 unmodified lines | ||
| 10 | 10 | package main |
| 11 | 11 | |
| 12 | 12 | import ( |
| 13 | − "os" | |
| 14 | − "net" | |
| 13 | + "bitbucket.org/floren/filemarshal" | |
| 14 | + "encoding/gob" | |
| 15 | 15 | "fmt" |
| 16 | − "log" | |
| 17 | 16 | "io" |
| 18 | − "gob" | |
| 19 | − "bitbucket.org/floren/filemarshal" | |
| 17 | + "log" | |
| 18 | + "net" | |
| 19 | + "os" | |
| 20 | 20 | "strconv" |
| 21 | 21 | "strings" |
| 22 | 22 | "syscall" |
| @@ -30,7 +30,6 @@ func (s SlaveResp) String() string { · 7 unmodified lines | ||
| 30 | 30 | return fmt.Sprint("id: ", s.Id) |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | − | |
| 34 | 33 | type Resp struct { |
| 35 | 34 | NumNodes int |
| 36 | 35 | Msg string |
| @@ -52,7 +51,7 @@ type cmdToExec struct { · 15 unmodified lines | ||
| 52 | 51 | DestName string |
| 53 | 52 | SymlinkTarget string |
| 54 | 53 | Local int |
| 55 | − Fi *os.FileInfo | |
| 54 | + Fi os.FileInfo | |
| 56 | 55 | } |
| 57 | 56 | |
| 58 | 57 | func (a *cmdToExec) String() string { |
| @@ -72,7 +71,7 @@ type vitalData struct { · 13 unmodified lines | ||
| 72 | 71 | HostAddr string |
| 73 | 72 | ParentAddr string |
| 74 | 73 | ServerAddr string |
| 75 | − Id string | |
| 74 | + Id string | |
| 76 | 75 | Nodes []string |
| 77 | 76 | Exceptlist map[string]bool |
| 78 | 77 | } |
| @@ -144,7 +143,6 @@ func (s *SlaveInfo) String() string { · 65 unmodified lines | ||
| 144 | 143 | return fmt.Sprint(s.Id, "@", s.Addr) |
| 145 | 144 | } |
| 146 | 145 | |
| 147 | − | |
| 148 | 146 | func Dprint(level int, arg ...interface{}) { |
| 149 | 147 | if *DebugLevel >= level { |
| 150 | 148 | log.Print(arg...) |
| @@ -168,7 +166,6 @@ const ( · 17 unmodified lines | ||
| 168 | 166 | Recv |
| 169 | 167 | ) |
| 170 | 168 | |
| 171 | − | |
| 172 | 169 | func IoString(i interface{}, dir int) string { |
| 173 | 170 | switch i.(type) { |
| 174 | 171 | case net.Conn: |
| @@ -227,7 +224,7 @@ func (r *RpcClientServer) Send(funcname string, arg interface{}) { · 52 unmodified lines | ||
| 227 | 224 | |
| 228 | 225 | var onRecvFunc func(funcname string, r io.Reader, arg interface{}) |
| 229 | 226 | |
| 230 | −func (r *RpcClientServer) Recv(funcname string, arg interface{}) (err os.Error) { | |
| 227 | +func (r *RpcClientServer) Recv(funcname string, arg interface{}) (err error) { | |
| 231 | 228 | err = r.D.Decode(arg) |
| 232 | 229 | if err != nil { |
| 233 | 230 | log.Print(funcname, ": Recv error: ", err) |
| @@ -242,10 +239,9 @@ func (r *RpcClientServer) Recv(funcname string, arg interface{}) (err os.Error) · 8 unmodified lines | ||
| 242 | 239 | return |
| 243 | 240 | } |
| 244 | 241 | |
| 245 | − | |
| 246 | 242 | var onDialFunc func(fam, laddr, raddr string) |
| 247 | 243 | |
| 248 | −func Dial(fam, laddr, raddr string) (c net.Conn, err os.Error) { | |
| 244 | +func Dial(fam, laddr, raddr string) (c net.Conn, err error) { | |
| 249 | 245 | if onDialFunc != nil { |
| 250 | 246 | onDialFunc(fam, laddr, raddr) |
| 251 | 247 | } |
| @@ -265,7 +261,6 @@ func Dial(fam, laddr, raddr string) (c net.Conn, err os.Error) { · 13 unmodified lines | ||
| 265 | 261 | return |
| 266 | 262 | } |
| 267 | 263 | |
| 268 | − | |
| 269 | 264 | type Listener struct { |
| 270 | 265 | l net.Listener |
| 271 | 266 | } |
| @@ -276,7 +271,7 @@ func (l Listener) Addr() net.Addr { · 4 unmodified lines | ||
| 276 | 271 | |
| 277 | 272 | var onListenFunc func(fam, laddr string) |
| 278 | 273 | |
| 279 | −func Listen(fam, laddr string) (l Listener, err os.Error) { | |
| 274 | +func Listen(fam, laddr string) (l Listener, err error) { | |
| 280 | 275 | if onListenFunc != nil { |
| 281 | 276 | onListenFunc(fam, laddr) |
| 282 | 277 | } |
| @@ -287,7 +282,7 @@ func Listen(fam, laddr string) (l Listener, err os.Error) { · 4 unmodified lines | ||
| 287 | 282 | |
| 288 | 283 | var onAcceptFunc func(c net.Conn) |
| 289 | 284 | |
| 290 | −func (l Listener) Accept() (c net.Conn, err os.Error) { | |
| 285 | +func (l Listener) Accept() (c net.Conn, err error) { | |
| 291 | 286 | c, err = l.l.Accept() |
| 292 | 287 | if err != nil { |
| 293 | 288 | return |
| @@ -299,13 +294,12 @@ func (l Listener) Accept() (c net.Conn, err os.Error) { · 5 unmodified lines | ||
| 299 | 294 | return |
| 300 | 295 | } |
| 301 | 296 | |
| 302 | − | |
| 303 | 297 | // depends on syscall |
| 304 | 298 | func WaitAllChildren() { |
| 305 | 299 | var status syscall.WaitStatus |
| 306 | 300 | for { |
| 307 | 301 | pid, err := syscall.Wait4(-1, &status, 0, nil) |
| 308 | − if err <= 0 { | |
| 302 | + if err != nil { | |
| 309 | 303 | break |
| 310 | 304 | } |
| 311 | 305 | log.Printf("wait4 returns pid %v status %v\n", pid, status) |
| @@ -318,7 +312,7 @@ func WaitAllChildren() { · 6 unmodified lines | ||
| 318 | 312 | * This function builds up a list of files that need to go out to the current node's sub-nodes. |
| 319 | 313 | * It is called by both the master and, if a more complex hierarchy is used, the upper-level slaves. |
| 320 | 314 | */ |
| 321 | −func cacheRelayFilesAndDelegateExec(arg *StartReq, root, clientnode string) os.Error { | |
| 315 | +func cacheRelayFilesAndDelegateExec(arg *StartReq, root, clientnode string) error { | |
| 322 | 316 | Dprint(2, "cacheRelayFilesAndDelegateExec: files ", arg.Cmds, " nodes: ", clientnode, " fileServer: ", arg.Lfam, arg.Lserver) |
| 323 | 317 | |
| 324 | 318 | larg := newStartReq(arg) |
| @@ -328,7 +322,7 @@ func cacheRelayFilesAndDelegateExec(arg *StartReq, root, clientnode string) os.E · 3 unmodified lines | ||
| 328 | 322 | comesfrom := root + c.DestName |
| 329 | 323 | Dprint(2, "current cmd comesfrom = ", comesfrom, ", DestName = ", c.DestName, ", CurrentName = ", c.CurrentName, ", SymlinkTarget = ", c.SymlinkTarget) |
| 330 | 324 | f := new(filemarshal.File) |
| 331 | − if c.Fi.IsRegular() || c.Fi.IsDirectory() || c.Fi.IsSymlink() { | |
| 325 | + if !c.Fi.IsDir() || c.Fi.IsDir() || ((c.Fi.Mode() & os.ModeSymlink) != 0) { | |
| 332 | 326 | f = &filemarshal.File{CurrentName: comesfrom, Fi: *c.Fi, SymlinkTarget: c.SymlinkTarget, DestName: c.DestName} |
| 333 | 327 | } else { |
| 334 | 328 | continue |
| @@ -360,6 +354,7 @@ func cacheRelayFilesAndDelegateExec(arg *StartReq, root, clientnode string) os.E · 25 unmodified lines | ||
| 360 | 354 | |
| 361 | 355 | return nil |
| 362 | 356 | } |
| 357 | + | |
| 363 | 358 | /* |
| 364 | 359 | * The ioProxy listens for incoming connections. Sub-nodes will connect to it |
| 365 | 360 | * and use the connection as stdin, stdout, and stderr for the programs they |
| @@ -371,7 +366,7 @@ func cacheRelayFilesAndDelegateExec(arg *StartReq, root, clientnode string) os.E · 5 unmodified lines | ||
| 371 | 366 | * finished. workerChan will contain one int for every client which has |
| 372 | 367 | * completed and disconnected. |
| 373 | 368 | */ |
| 374 | −func ioProxy(fam, server string, dest io.Writer) (workerChan chan int, l Listener, err os.Error) { | |
| 369 | +func ioProxy(fam, server string, dest io.Writer) (workerChan chan int, l Listener, err error) { | |
| 375 | 370 | workerChan = make(chan int, 0) |
| 376 | 371 | l, err = Listen(fam, server) |
| 377 | 372 | if err != nil { |
| @@ -416,7 +411,7 @@ type nodeExecList struct { · 38 unmodified lines | ||
| 416 | 411 | * the really hard way: few people understand regular expressions. So we |
| 417 | 412 | * don't use them. |
| 418 | 413 | */ |
| 419 | −func parseNodeList(l string) (rl []nodeExecList, err os.Error) { | |
| 414 | +func parseNodeList(l string) (rl []nodeExecList, err error) { | |
| 420 | 415 | /* bust it apart by , */ |
| 421 | 416 | ranges := strings.SplitN(l, ",", -1) |
| 422 | 417 | for _, n := range ranges { |
| @@ -465,7 +460,7 @@ func doPrivateMount(pathbase string) { · 42 unmodified lines | ||
| 465 | 460 | * Make a TCP connection to a server, return both the connection and |
| 466 | 461 | * a File pointing to that connection. |
| 467 | 462 | */ |
| 468 | −func fileTcpDial(server string) (*os.File, net.Conn, os.Error) { | |
| 463 | +func fileTcpDial(server string) (*os.File, net.Conn, error) { | |
| 469 | 464 | var laddr net.TCPAddr |
| 470 | 465 | raddr, err := net.ResolveTCPAddr("tcp4", server) |
| 471 | 466 | if err != nil { |
| @@ -503,13 +498,11 @@ func newStartReq(arg *StartReq) *StartReq { · 31 unmodified lines | ||
| 503 | 498 | } |
| 504 | 499 | } |
| 505 | 500 | |
| 506 | − | |
| 507 | 501 | /* |
| 508 | 502 | * Functions and data types for keeping track of slave nodes |
| 509 | 503 | */ |
| 510 | 504 | |
| 511 | − | |
| 512 | −func registerSlaves() os.Error { | |
| 505 | +func registerSlaves() error { | |
| 513 | 506 | l, err := Listen(*defaultFam, myListenAddress) |
| 514 | 507 | if err != nil { |
| 515 | 508 | log.Fatal("listen error:", err) |
| @@ -584,8 +577,8 @@ func (sv *Slaves) Add(vd *vitalData, r *RpcClientServer) (resp SlaveResp) { · 68 unmodified lines | ||
| 584 | 577 | |
| 585 | 578 | func (sv *Slaves) Remove(s *SlaveInfo) { |
| 586 | 579 | Dprintln(4, "Remove %v ", s, " slave %v", sv.Slaves[s.Id]) |
| 587 | − sv.Slaves[s.Id] = nil, false | |
| 588 | − sv.Addr2id[s.Server] = "", false | |
| 580 | + delete(sv.Slaves, s.Id) | |
| 581 | + delete(sv.Addr2id, s.Server) | |
| 589 | 582 | Dprintln(2, "slave Remove: Id: ", s) |
| 590 | 583 | return |
| 591 | 584 | } |
| @@ -600,7 +593,7 @@ func (sv *Slaves) Remove(s *SlaveInfo) { · 8 unmodified lines | ||
| 600 | 593 | func (sv *Slaves) Get(n string) (s *SlaveInfo, ok bool) { |
| 601 | 594 | Dprint(6, "Get: ", n) |
| 602 | 595 | s, ok = sv.Slaves[n] |
| 603 | − if ! ok { | |
| 596 | + if !ok { | |
| 604 | 597 | s, ok = sv.Slaves[sv.Addr2id[n]] |
| 605 | 598 | } |
| 606 | 599 | Dprint(6, " Returns: ", s) |
| @@ -10,14 +10,14 @@ · 9 unmodified lines | ||
| 10 | 10 | package main |
| 11 | 11 | |
| 12 | 12 | import ( |
| 13 | + "bitbucket.org/rminnich/forth" | |
| 14 | + "encoding/gob" | |
| 15 | + "flag" | |
| 16 | + "fmt" | |
| 13 | 17 | "log" |
| 18 | + "net/rpc" | |
| 14 | 19 | "os" |
| 15 | − "rpc" | |
| 16 | − "fmt" | |
| 17 | 20 | "strconv" |
| 18 | − "flag" | |
| 19 | − "gob" | |
| 20 | − "bitbucket.org/rminnich/forth" | |
| 21 | 21 | ) |
| 22 | 22 | |
| 23 | 23 | func usage() { |
| @@ -43,14 +43,14 @@ var ( · 19 unmodified lines | ||
| 43 | 43 | defaultMasterUDS = flag.String("defaultMasterUDS", "/tmp/g", "Default Master Unix Domain Socket") |
| 44 | 44 | ioProxyPort = flag.String("iopp", "0", "io proxy port") |
| 45 | 45 | cmdPort = flag.String("cmdport", "6666", "command port") |
| 46 | − defaultFam = flag.String("fam", "tcp4", "network type") | |
| 47 | − gprocBin = flag.String("gprocBin", "gproc", "name of gproc binary") | |
| 46 | + defaultFam = flag.String("fam", "tcp4", "network type") | |
| 47 | + gprocBin = flag.String("gprocBin", "gproc", "name of gproc binary") | |
| 48 | 48 | /* required in the command line */ |
| 49 | − parent = flag.String("parent", "hostname", "parent for some configurations") | |
| 49 | + parent = flag.String("parent", "hostname", "parent for some configurations") | |
| 50 | 50 | myAddress = flag.String("myAddress", "hostname", "Required set to my address") |
| 51 | − myId = flag.String("myId", "0", "Required -- tell slaves their id") | |
| 51 | + myId = flag.String("myId", "0", "Required -- tell slaves their id") | |
| 52 | 52 | /* these are not switches */ |
| 53 | − role = "client" | |
| 53 | + role = "client" | |
| 54 | 54 | myListenAddress string |
| 55 | 55 | ) |
| 56 | 56 | |
| @@ -63,9 +63,9 @@ var ( · 6 unmodified lines | ||
| 63 | 63 | * You can just put a simple string in for the argument and it will push and pop it |
| 64 | 64 | * ./gproc_linux_arm -parent='hostname base 7 roundup sb strcat 10.1.1.1 hostname base 7 % ifelse' -myId='hostname base 7 % 1 + hostname base 7 / hostname base 7 % ifelse' -myAddress=hostname s |
| 65 | 65 | * is used for strongbox, where there is a single root, 49 level 1s defined by name %7 == 0, and |
| 66 | − */ | |
| 66 | + */ | |
| 67 | 67 | func main() { |
| 68 | − var err os.Error | |
| 68 | + var err error | |
| 69 | 69 | flag.Usage = usage |
| 70 | 70 | flag.Parse() |
| 71 | 71 | interp := forth.New() |
| @@ -115,11 +115,11 @@ func main() { · 43 unmodified lines | ||
| 115 | 115 | info := getInfo(*defaultMasterUDS, flag.Arg(1)) |
| 116 | 116 | fmt.Print("Nodes:\n", info) |
| 117 | 117 | /* not yet |
| 118 | − case "EXCEPT", "except", "x": | |
| 119 | − loc.Init("init") | |
| 120 | − exceptOK := except(*defaultMasterUDS, flag.Args()[1:]) | |
| 121 | − fmt.Print(exceptOK) | |
| 122 | − */ | |
| 118 | + case "EXCEPT", "except", "x": | |
| 119 | + loc.Init("init") | |
| 120 | + exceptOK := except(*defaultMasterUDS, flag.Args()[1:]) | |
| 121 | + fmt.Print(exceptOK) | |
| 122 | + */ | |
| 123 | 123 | case "R": |
| 124 | 124 | /* This is for executing a program from the slave */ |
| 125 | 125 | slaveProc(NewRpcClientServer(os.Stdin, *binRoot), &RpcClientServer{E: gob.NewEncoder(os.Stdout), D: gob.NewDecoder(os.Stdout)}, &RpcClientServer{E: gob.NewEncoder(os.NewFile(3, "pipe")), D: gob.NewDecoder(os.NewFile(3, "pipe"))}) |
| @@ -9,10 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | |
| 10 | 10 | package main |
| 11 | 11 | |
| 12 | −import ( | |
| 13 | − "os" | |
| 14 | − "log" | |
| 15 | −) | |
| 12 | +import "log" | |
| 16 | 13 | |
| 17 | 14 | var ( |
| 18 | 15 | Workers []Worker |
| @@ -74,7 +71,7 @@ func sendCommandsToNodes(r *RpcClientServer, sendReq *StartReq, root string) (nu · 55 unmodified lines | ||
| 74 | 71 | slaveNodes, err := parseNodeList(sendReq.Nodes) |
| 75 | 72 | Dprint(2, "receiveCmds: sendReq.Nodes: ", sendReq.Nodes, " expands to ", slaveNodes) |
| 76 | 73 | if err != nil { |
| 77 | − r.Send("receiveCmds", Resp{NumNodes: 0, Msg: "startExecution: bad slaveNodeList: " + err.String()}) | |
| 74 | + r.Send("receiveCmds", Resp{NumNodes: 0, Msg: "startExecution: bad slaveNodeList: " + err.Error()}) | |
| 78 | 75 | return |
| 79 | 76 | } |
| 80 | 77 | for _, aNode := range slaveNodes { |
| @@ -91,7 +88,7 @@ func sendCommandsToNodes(r *RpcClientServer, sendReq *StartReq, root string) (nu · 10 unmodified lines | ||
| 91 | 88 | /* |
| 92 | 89 | * The master sits in a loop listening for commands to come in over the Unix domain socket. |
| 93 | 90 | */ |
| 94 | −func receiveCmds(domainSock string) os.Error { | |
| 91 | +func receiveCmds(domainSock string) error { | |
| 95 | 92 | vitalData := vitalData{HostAddr: "", HostReady: false, Error: "No hosts ready", Exceptlist: exceptFiles} |
| 96 | 93 | l, err := Listen("unix", *defaultMasterUDS) |
| 97 | 94 | if err != nil { |
| @@ -18,13 +18,14 @@ · 17 unmodified lines | ||
| 18 | 18 | package main |
| 19 | 19 | |
| 20 | 20 | import ( |
| 21 | + "bitbucket.org/rminnich/ldd" | |
| 22 | + "errors" | |
| 23 | + "fmt" | |
| 21 | 24 | "log" |
| 22 | 25 | "os" |
| 23 | − "strings" | |
| 24 | − "bitbucket.org/rminnich/ldd" | |
| 25 | 26 | "path" |
| 26 | 27 | "path/filepath" |
| 27 | − "fmt" | |
| 28 | + "strings" | |
| 28 | 29 | ) |
| 29 | 30 | |
| 30 | 31 | /* |
| @@ -136,7 +137,7 @@ func startExecution(masterAddr, fam, ioProxyPort, slaveNodes string, cmd []strin · 105 unmodified lines | ||
| 136 | 137 | } |
| 137 | 138 | |
| 138 | 139 | var ( |
| 139 | − BadRangeErr = os.NewError("bad range format") | |
| 140 | + BadRangeErr = errors.New("bad range format") | |
| 140 | 141 | ) |
| 141 | 142 | |
| 142 | 143 | type packVisitor struct { |
| @@ -149,7 +150,7 @@ func newPackVisitor() (p *packVisitor) { · 6 unmodified lines | ||
| 149 | 150 | return &packVisitor{alreadyVisited: make(map[string]bool)} |
| 150 | 151 | } |
| 151 | 152 | |
| 152 | −func (p *packVisitor) VisitDir(filePath string, f *os.FileInfo) bool { | |
| 153 | +func (p *packVisitor) VisitDir(filePath string, f os.FileInfo) bool { | |
| 153 | 154 | filePath = strings.TrimSpace(filePath) |
| 154 | 155 | filePath = strings.TrimRightFunc(filePath, isNull) |
| 155 | 156 | |
| @@ -180,7 +181,7 @@ func isNull(r int) bool { · 24 unmodified lines | ||
| 180 | 181 | return r == 0 |
| 181 | 182 | } |
| 182 | 183 | |
| 183 | −func (p *packVisitor) VisitFile(filePath string, f *os.FileInfo) { | |
| 184 | +func (p *packVisitor) VisitFile(filePath string, f os.FileInfo) { | |
| 184 | 185 | // shouldn't need to do this, need to fix ldd |
| 185 | 186 | filePath = strings.TrimSpace(filePath) |
| 186 | 187 | filePath = strings.TrimRightFunc(filePath, isNull) |
| @@ -194,13 +195,13 @@ func (p *packVisitor) VisitFile(filePath string, f *os.FileInfo) { · 7 unmodified lines | ||
| 194 | 195 | Local: 0, |
| 195 | 196 | Fi: f, |
| 196 | 197 | } |
| 197 | − Dprint(4, "VisitFile: appending ", f.Name, " ", f.Size, " ", []byte(filePath), " ", p.alreadyVisited) | |
| 198 | + Dprint(4, "VisitFile: appending ", f.Name(), " ", f.Size(), " ", []byte(filePath), " ", p.alreadyVisited) | |
| 198 | 199 | |
| 199 | 200 | p.cmds = append(p.cmds, c) |
| 200 | 201 | |
| 201 | 202 | switch { |
| 202 | − case f.IsRegular(): | |
| 203 | − p.bytesToTransfer += f.Size | |
| 203 | + case !f.IsDir(): | |
| 204 | + p.bytesToTransfer += f.Size() | |
| 204 | 205 | case f.IsSymlink(): |
| 205 | 206 | /* we have to read the link but also get a path the file for |
| 206 | 207 | * further walking. We think. |
| @@ -31,11 +31,10 @@ import ( · 30 unmodified lines | ||
| 31 | 31 | // return cmds |
| 32 | 32 | // } |
| 33 | 33 | |
| 34 | − | |
| 35 | −func readitin(s, root string) ([]byte, os.FileInfo, os.Error) { | |
| 34 | +func readitin(s, root string) ([]byte, os.FileInfo, error) { | |
| 36 | 35 | fi, _ := os.Stat(root + s) |
| 37 | 36 | f, _ := os.Open(s) |
| 38 | − bytes := make([]byte, fi.Size) | |
| 37 | + bytes := make([]byte, fi.Size()) | |
| 39 | 38 | f.Read(bytes) |
| 40 | 39 | return bytes, *fi, nil |
| 41 | 40 | } |
| @@ -44,12 +43,12 @@ type Arg struct { · 2 unmodified lines | ||
| 44 | 43 | Msg []byte |
| 45 | 44 | } |
| 46 | 45 | |
| 47 | −func Ping(arg *Arg, resp *Resp) os.Error { | |
| 46 | +func Ping(arg *Arg, resp *Resp) error { | |
| 48 | 47 | resp.Msg = string(arg.Msg) |
| 49 | 48 | return nil |
| 50 | 49 | } |
| 51 | 50 | |
| 52 | −func Debug(arg *SetDebugLevel, resp *SetDebugLevel) os.Error { | |
| 51 | +func Debug(arg *SetDebugLevel, resp *SetDebugLevel) error { | |
| 53 | 52 | resp.level = *DebugLevel |
| 54 | 53 | *DebugLevel = arg.level |
| 55 | 54 | return nil |
| @@ -15,9 +15,9 @@ import ( · 14 unmodified lines | ||
| 15 | 15 | "os" |
| 16 | 16 | "net" |
| 17 | 17 | "fmt" |
| 18 | − "gob" | |
| 18 | + "encoding/gob" | |
| 19 | 19 | "time" |
| 20 | − "rand" | |
| 20 | + "math/rand" | |
| 21 | 21 | ) |
| 22 | 22 | |
| 23 | 23 | var id string |
| @@ -10,13 +10,13 @@ · 9 unmodified lines | ||
| 10 | 10 | package main |
| 11 | 11 | |
| 12 | 12 | import ( |
| 13 | − "http" | |
| 13 | + "net/http" | |
| 14 | 14 | "io" |
| 15 | 15 | "log" |
| 16 | 16 | "old/template" |
| 17 | − "exec" | |
| 17 | + "os/exec" | |
| 18 | 18 | "os" |
| 19 | − "url" | |
| 19 | + "net/url" | |
| 20 | 20 | ) |
| 21 | 21 | |
| 22 | 22 | var fmap = template.FormatterMap{ |