From 2bf832f88379be229b43de881c2fd8c655f31a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20R=C3=A9thelyi?= <rethelyibalint@gmail.com> Date: Tue, 21 Sep 2021 15:09:24 +0200 Subject: [PATCH] update gomod --- go.mod | 4 +++- main.go | 4 ++-- web/router.go | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index e034e83..287f326 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,9 @@ -module keresettaferi +module git.sch.bme.hu/blintmester/keresett-a-feri go 1.17 +replace git.sch.bme.hu/blintmester/keresett-a-feri => ./ + require ( github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.7.4 // indirect diff --git a/main.go b/main.go index b937901..a5e6df6 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,8 @@ package main import ( - "keresettaferi/route" - "keresettaferi/web" + "git.sch.bme.hu/blintmester/keresett-a-feri/route" + "git.sch.bme.hu/blintmester/keresett-a-feri/web" "log" "math/rand" "time" diff --git a/web/router.go b/web/router.go index ad1a9b5..ed9be46 100644 --- a/web/router.go +++ b/web/router.go @@ -2,9 +2,9 @@ package web import ( "errors" + "git.sch.bme.hu/blintmester/keresett-a-feri/route" "github.com/gin-gonic/gin" "io/fs" - "keresettaferi/route" "net/http" ) @@ -12,7 +12,7 @@ var Router = gin.Default() type StationURI struct { Name string `uri:"name" binding:"required"` - Id string `uri:"uuid" binding:"required"` + Id string `uri:"uuid" binding:"required"` } func init() { @@ -42,7 +42,7 @@ func routeChooser(c *gin.Context) { } if stationUri.Name != "station" { - c.Error(errors.New("wrong path")) // TODO: better error msg + c.Error(errors.New("wrong path")) // TODO: better error msg return } @@ -63,4 +63,4 @@ func routeChooser(c *gin.Context) { return } } -} \ No newline at end of file +} -- GitLab