1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-23 23:54:17 +03:00
croc/main.go
2018-07-07 10:08:11 -07:00

24 lines
296 B
Go

package main
import (
"flag"
croc "github.com/schollz/croc/src"
)
func main() {
var err error
role := flag.Int("role", 0, "role number")
flag.Parse()
c := croc.Init()
if *role == 0 {
err = c.Relay()
} else if *role == 1 {
err = c.Send("foo")
}
if err != nil {
panic(err)
}
}