Skip to content

steve-phan/here-we-GO

Repository files navigation

Go tutorial.

  1. Deal with JSON file
  • parse
json.Unmarshal
  • stringify(js)
json.Marshal
  1. Deal with environment variables
    // load some ENV files first (".dev.env", prod.env)
	err := godotenv.Load()

	if err != nil {
		log.Fatal("Error, loading env fail")
	}
	// Load successfull then get Key
	key := os.Getenv("SUPER_KEY")
	log.Println("KEY", key)
  1. Composition vs inheritace

Releases

No releases published

Packages

No packages published