// Get environment variables for local development.
Get environment variables for local development.
// Get environment variables for local development .
func initializeLocalFauna() {
	if secret == "" && endpoint == "" {
		file, err := ioutil.ReadFile("./.env.sh")
		if err == nil {
			content := string(file)
			contentSlice := strings.Split(content, "\n")
			m := map[string]string{}
			for _, row := range contentSlice {
				kv := strings.Split(row, "=")
				l := len(kv)
				if l == 2 {
					m[kv[0]] = kv[1]
				}
			}
			secret = m["FAUNA_SECRET"]
			endpoint = m["FAUNA_ENDPOINT"]
		}
	}
}
func initializeLocalFauna ( ) { if secret == " " && endpoint == " " { file , err := ioutil . ReadFile ( " " ) if err == nil { content := string ( file ) contentSlice := strings . Split ( content , " \n " ) m := map [ string ] string { } for _ , row := range contentSlice { kv := strings . Split ( row , " " ) l := len ( kv ) if l == 2 { m [ kv [ 0 ] ] = kv [ 1 ] } } secret = m [ " " ] endpoint = m [ " " ] } } }
Get environment variables for local development.
Get environment variables for local development .