Makefile, server entry point prototype, compareFiles function + other minor changes

This commit is contained in:
Gu://em_ 2025-04-13 12:50:35 +02:00
parent 2efb8c4130
commit c1ccb61346
10 changed files with 139 additions and 56 deletions

View file

@ -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] + "\"")
}
}
}