2026-03-29 21:44:22 +00:00
|
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"dappco.re/go/core"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func Example_registerAppCommands() {
|
|
|
|
|
c := core.New(core.WithOption("name", "core-agent"))
|
|
|
|
|
registerAppCommands(c)
|
|
|
|
|
|
|
|
|
|
core.Println(len(c.Commands()))
|
|
|
|
|
// Output: 3
|
|
|
|
|
}
|
2026-03-30 00:00:33 +00:00
|
|
|
|
|
|
|
|
func Example_applyLogLevel() {
|
|
|
|
|
args := applyLogLevel([]string{"--debug", "status"})
|
|
|
|
|
|
|
|
|
|
core.Println(args[0])
|
|
|
|
|
// Output: status
|
|
|
|
|
}
|