diff --git a/main.go b/main.go index 61451e4..07c823b 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "log" "os" ) @@ -9,4 +10,16 @@ func main() { for _, v := range os.Environ() { fmt.Println(v) } + + giteaEnvFile, ok := os.LookupEnv("GITEA_ENV") + if !ok { + log.Fatalln("Gitea env file not found") + } + + raw, err := os.ReadFile(giteaEnvFile) + if err != nil { + log.Fatalln("Gitea env file read error:", err) + } + + fmt.Println(string(raw)) }