agent/cmd/core-agent/main_example_test.go
Virgil e825550a90 fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:30:49 +00:00

32 lines
636 B
Go

// SPDX-License-Identifier: EUPL-1.2
package main
import (
agentpkg "dappco.re/go/agent"
core "dappco.re/go/core"
)
func Example_newCoreAgent() {
oldVersion := agentpkg.Version
agentpkg.Version = "0.15.0"
defer func() { agentpkg.Version = oldVersion }()
c := newCoreAgent()
core.Println(c.App().Name)
core.Println(c.App().Version)
core.Println(len(c.Commands()) >= 3)
// Output:
// core-agent
// 0.15.0
// true
}
func Example_applicationVersion() {
oldVersion := agentpkg.Version
agentpkg.Version = "0.15.0"
defer func() { agentpkg.Version = oldVersion }()
core.Println(applicationVersion())
// Output: 0.15.0
}