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