From 349fb9bcf112121b0663de5de9c713d792e678fb Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Fri, 25 Feb 2022 18:25:54 +0100 Subject: [PATCH] Refactor al nuovo nome del repo anche qua --- .env.dev | 4 ++-- README.md | 4 ++-- articles/article.go | 2 +- config/config.go | 16 ++++++++-------- go.mod | 2 +- main.go | 8 ++++---- templates/templates.go | 4 ++-- views/partials/navbar.html | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.env.dev b/.env.dev index 0ff81ad..ab3d17b 100644 --- a/.env.dev +++ b/.env.dev @@ -3,8 +3,8 @@ MODE=development HOST=localhost:8000 # Separate services -GIT_URL=https://git.example.org -FORUM_URL=https://forum.example.org +GIT_URL=https://git.phc.dm.unipi.it +CHAT_URL=https://chat.phc.dm.unipi.it # Other EMAIL=mail@example.org diff --git a/README.md b/README.md index 5b2b0c4..8d630e0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Repo del server del nuovo sito per il PHC. Per clonare il progetto usare ```bash -$ git clone https://github.com/phc-dm/phc-server +$ git clone https://git.phc.dm.unipi.it/phc/website ``` ## Development @@ -39,4 +39,4 @@ $ find . -type f -name '*.go' | entr -r go run . Rappresentano link ad altri servizi forniti, è comodo impostarli così in modo da poter anche provare tutto insieme in locale su varie porte (e poi in produzione i vari url diventano link a sotto-domini del sito principale). - Per ora ci sono solo `GIT_URL` e `FORUM_URL`. + Per ora ci sono solo `GIT_URL` e `CHAT_URL`. diff --git a/articles/article.go b/articles/article.go index d914ff9..7ce27b0 100644 --- a/articles/article.go +++ b/articles/article.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/phc-dm/phc-server/config" + "git.phc.dm.unipi.it/phc/website/config" "gopkg.in/yaml.v3" ) diff --git a/config/config.go b/config/config.go index 8824811..3dd86e5 100644 --- a/config/config.go +++ b/config/config.go @@ -5,15 +5,15 @@ import ( "os" "strings" + "git.phc.dm.unipi.it/phc/website/util" "github.com/joho/godotenv" - "github.com/phc-dm/phc-server/util" ) var Mode string var Host string var GitUrl string -var ForumUrl string +var ChatUrl string var Email string func loadEnv(target *string, name, defaultValue string) { @@ -34,16 +34,16 @@ func Load() { loadEnv(&Mode, "MODE", "production") loadEnv(&Host, "HOST", "localhost:8080") loadEnv(&GitUrl, "GIT_URL", "https://git.example.org") - loadEnv(&ForumUrl, "FORUM_URL", "https://forum.example.org") + loadEnv(&ChatUrl, "CHAT_URL", "https://chat.example.org") loadEnv(&Email, "EMAIL", "mail@example.org") } func Object() util.H { return util.H{ - "Mode": Mode, - "Host": Host, - "GitUrl": GitUrl, - "ForumUrl": ForumUrl, - "Email": Email, + "Mode": Mode, + "Host": Host, + "GitUrl": GitUrl, + "ChatUrl": ChatUrl, + "Email": Email, } } diff --git a/go.mod b/go.mod index 08d7018..9fac591 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/phc-dm/phc-server +module git.phc.dm.unipi.it/phc/website go 1.13 diff --git a/main.go b/main.go index 2965146..e3abc1a 100644 --- a/main.go +++ b/main.go @@ -5,12 +5,12 @@ import ( "log" "net/http" + "git.phc.dm.unipi.it/phc/website/articles" + "git.phc.dm.unipi.it/phc/website/config" + "git.phc.dm.unipi.it/phc/website/templates" + "git.phc.dm.unipi.it/phc/website/util" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" - "github.com/phc-dm/phc-server/articles" - "github.com/phc-dm/phc-server/config" - "github.com/phc-dm/phc-server/templates" - "github.com/phc-dm/phc-server/util" ) func main() { diff --git a/templates/templates.go b/templates/templates.go index 79d8f0c..9a22d88 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -6,8 +6,8 @@ import ( "path" "strings" - "github.com/phc-dm/phc-server/config" - "github.com/phc-dm/phc-server/util" + "git.phc.dm.unipi.it/phc/website/config" + "git.phc.dm.unipi.it/phc/website/util" ) type LoadTemplate interface { diff --git a/views/partials/navbar.html b/views/partials/navbar.html index dee9497..ed6d6c9 100644 --- a/views/partials/navbar.html +++ b/views/partials/navbar.html @@ -26,7 +26,7 @@ Gitea