New example files: entitlement, task, lock, log, drive, config, command, info. Every major source file now has a dedicated *_example_test.go with compilable, tested examples. 561 tests, 84.8% coverage. Co-Authored-By: Virgil <virgil@lethean.io>
18 lines
260 B
Go
18 lines
260 B
Go
package core_test
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
. "dappco.re/go/core"
|
|
)
|
|
|
|
func ExampleEnv() {
|
|
fmt.Println(Env("OS")) // e.g. "darwin"
|
|
fmt.Println(Env("ARCH")) // e.g. "arm64"
|
|
}
|
|
|
|
func ExampleEnvKeys() {
|
|
keys := EnvKeys()
|
|
fmt.Println(len(keys) > 0)
|
|
// Output: true
|
|
}
|