refactor simple TCP server into pkg
This commit is contained in:
23
cmd/primetime/main.go
Normal file
23
cmd/primetime/main.go
Normal file
@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"protohackers/pkg/conn"
|
||||
)
|
||||
|
||||
type data struct {
|
||||
Method string `json:"method"`
|
||||
Number int `json:"number"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
err := conn.StartSimple(primetime)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
||||
func primetime(c net.Conn) {
|
||||
}
|
Reference in New Issue
Block a user