moved to src/ folder; add users
This commit is contained in:
parent
b2d3e38236
commit
dd76910326
@ -3,10 +3,10 @@ info:
|
||||
@perl -ne 'm/^([a-zA-Z0-9\-]+):/ && print(" $$1\n");' Makefile
|
||||
|
||||
build:
|
||||
go build knyt.go
|
||||
cd src/ && go build -o ../knyt knyt.go
|
||||
|
||||
run:
|
||||
go run knyt.go
|
||||
cd src/ && go run knyt.go
|
||||
|
||||
run-loop:
|
||||
pexec -R -c -e TARGET \
|
||||
@ -15,7 +15,7 @@ run-loop:
|
||||
-- $(MAKE) '$$TARGET'
|
||||
|
||||
run-standalone:
|
||||
./knyt
|
||||
cd src/ && ../knyt
|
||||
|
||||
_run-endless-loop:
|
||||
while true; do $(MAKE) run || sleep 3; done
|
||||
|
5
server/data/users/764353.json
Normal file
5
server/data/users/764353.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
id: "764353",
|
||||
name: "Settel",
|
||||
role: "admin",
|
||||
}
|
5
server/data/users/837293.json
Normal file
5
server/data/users/837293.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
id: "837293",
|
||||
name: "Player #1",
|
||||
role: "player",
|
||||
}
|
7
server/src/users/struct.go
Normal file
7
server/src/users/struct.go
Normal file
@ -0,0 +1,7 @@
|
||||
package users
|
||||
|
||||
type User struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Role string `json:"role"`
|
||||
}
|
8
server/src/users/users.go
Normal file
8
server/src/users/users.go
Normal file
@ -0,0 +1,8 @@
|
||||
package users
|
||||
|
||||
func NewUser(id, name string) *User {
|
||||
return &User{
|
||||
id: id,
|
||||
name: name,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user