// Get the value of the "FOO" environment variable for a job: envVar, err := job.GetEnv("FOO") if err != nil { // Handle error } fmt.Println(envVar) // Output: bar
// Iterate over all environment variables for a job: envVars := job.Env() for _, envVar := range envVars { fmt.Println(envVar) } // Output: // FOO=bar // BAZ=quuxIn this example, `job.Env()` returns a slice of all environment variables for the job. The value of each variable is printed to the console. From the syntax of examples, it can be determined that the package library is `dockerengine`.