agent/pkg/setup/config_example_test.go

29 lines
598 B
Go
Raw Permalink Normal View History

// SPDX-License-Identifier: EUPL-1.2
package setup
import (
core "dappco.re/go/core"
)
func ExampleGenerateBuildConfig() {
dir := (&core.Fs{}).NewUnrestricted().TempDir("example")
defer (&core.Fs{}).NewUnrestricted().DeleteAll(dir)
config := GenerateBuildConfig(dir, TypeGo)
core.Println(config.OK)
core.Println(core.Contains(config.Value.(string), "type: go"))
// Output:
// true
// true
}
func ExampleGenerateTestConfig() {
config := GenerateTestConfig(TypeGo)
core.Println(config.OK)
core.Println(core.Contains(config.Value.(string), "go test"))
// Output:
// true
// true
}