Restored progress

This commit is contained in:
Gu://em_ 2025-01-01 22:18:08 +01:00
parent f615cff76d
commit 5244f87411
19 changed files with 1061 additions and 0 deletions

44
cmd/client/main.go Normal file
View file

@ -0,0 +1,44 @@
package main
import (
"cosync/internal/client"
"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 "-c":
client.Run()
// break
case "-p":
panic("Not implemented")
case "--help":
panic("Not implemented")
case "--test":
tests.TestAll()
default:
panic("Bad argument : \"" + os.Args[i] + "\"")
}
}
}