24 lines
425 B
Go
24 lines
425 B
Go
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
package agentic
|
|
|
|
import (
|
|
"context"
|
|
|
|
core "dappco.re/go/core"
|
|
)
|
|
|
|
func ExampleProcessRegister() {
|
|
c := core.New()
|
|
ProcessRegister(c)
|
|
|
|
r := c.Action("process.run").Run(context.Background(), core.NewOptions(
|
|
core.Option{Key: "command", Value: "echo"},
|
|
core.Option{Key: "args", Value: []string{"ok"}},
|
|
))
|
|
if r.OK {
|
|
core.Println(core.Trim(r.Value.(string)))
|
|
}
|
|
|
|
// Output: ok
|
|
}
|