Skip to content

Instantly share code, notes, and snippets.

@trevoro
Created March 22, 2017 00:56
Show Gist options
  • Save trevoro/780409c9970611c7a97efc32def41876 to your computer and use it in GitHub Desktop.
Save trevoro/780409c9970611c7a97efc32def41876 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
)
type config struct {
V string
X string
}
func (c *config) isValid() bool {
if c.X == "" {
return false
}
if c.V == "" {
return false
}
return true
}
func main() {
c := config{
os.Getenv("TEST1"),
os.Getenv("TEST2"),
}
fmt.Println(c.isValid())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment