Makefile, server entry point prototype, compareFiles function + other minor changes
This commit is contained in:
parent
2efb8c4130
commit
c1ccb61346
10 changed files with 139 additions and 56 deletions
|
|
@ -1 +1,38 @@
|
|||
package server
|
||||
package server
|
||||
|
||||
import (
|
||||
"cosync/internal/server"
|
||||
// "cosync/tests"
|
||||
"os"
|
||||
)
|
||||
|
||||
// TODO: handle arguments correctly
|
||||
func main() {
|
||||
argc := len(os.Args)
|
||||
if argc < 2 {
|
||||
panic("Not enough arguments (try --help)")
|
||||
}
|
||||
|
||||
for i := 1; i < argc; i++ {
|
||||
|
||||
switch os.Args[i] {
|
||||
|
||||
case "-s":
|
||||
server.Run()
|
||||
// break
|
||||
|
||||
case "-p":
|
||||
panic("Not implemented")
|
||||
|
||||
case "--help":
|
||||
panic("Not implemented")
|
||||
|
||||
// case "--test":
|
||||
// tests.TestAll()
|
||||
|
||||
default:
|
||||
panic("Bad argument : \"" + os.Args[i] + "\"")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue