
- Explicitly list all test cases. This makes it possible to store tests in testdata/ that aren't tested on all platforms. - Clean up filesystem and env test, by running them in a subtest and deduplicating some code and removing the additionalArgs parameter.
14 строки
158 Б
Go
14 строки
158 Б
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
println(os.Getenv("ENV1"))
|
|
v, ok := os.LookupEnv("ENV2")
|
|
if !ok {
|
|
panic("ENV2 not found")
|
|
}
|
|
println(v)
|
|
}
|