very first commit

This commit is contained in:
2024-09-08 03:01:32 +03:00
commit 20c4f25c55
10 changed files with 166 additions and 0 deletions

28
cmd/main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"log"
"os"
"github.com/joho/godotenv"
)
// init is invoked before main()
func init() {
// loads values from .env into the system
if err := godotenv.Load(); err != nil {
log.Print("No .env file found")
}
}
func main() {
// Get the GREETING environment variable
greeting, exists := os.LookupEnv("GREETING")
if exists {
fmt.Println(greeting)
}
fmt.Println("fin")
}