Привет. Юзаю роутер
github.com/julienschmidt/httprouter
Сейчас сделал каркас всех маршрутов
pastebin.com/x74jrCpz
При компиляции говорит
v-smerti@vsmerti-K8N:~/localhost/api/src/generais$ go run main.go
panic: path segment 'main/:keyApi/:token/:hash' conflicts with existing wildcard ':keyApi' in path '/battleground/main/:keyApi/:token/:hash'
goroutine 1 [running]:
github.com/julienschmidt/httprouter.(*node).addRoute(0x188d5cb0, 0x8485e6e, 0x19, 0x84d0228)
/home/v-smerti/localhost/api/src/github.com/julienschmidt/httprouter/tree.go:153 +0x5ec
github.com/julienschmidt/httprouter.(*Router).Handle(0x188d7fa0, 0x8430bec, 0x3, 0x8485e60, 0x27, 0x84d0228)
/home/v-smerti/localhost/api/src/github.com/julienschmidt/httprouter/router.go:229 +0x1b2
github.com/julienschmidt/httprouter.(*Router).GET(0x188d7fa0, 0x8485e60, 0x27, 0x84d0228)
/home/v-smerti/localhost/api/src/github.com/julienschmidt/httprouter/router.go:173 +0x4a
main.main()
/home/v-smerti/localhost/api/src/generais/main.go:410 +0x535
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_386.s:1662 +0x1
goroutine 5 [chan receive]:
database/sql.(*DB).connectionOpener(0x188f8000)
/usr/lib/go/src/database/sql/sql.go:634 +0x3c
created by database/sql.Open
/usr/lib/go/src/database/sql/sql.go:481 +0x276
exit status 2
Зарание спасибо
go build компилит. А вот go run main.go ошибки
Во время запуска бинарника теже ошибки