initial commit

This commit is contained in:
2024-08-01 23:42:30 +03:00
commit 09fef3c113
21 changed files with 931 additions and 0 deletions

25
examples/basic/service.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"context"
"fmt"
"git.derfenix.pro/fenix/commander"
"github.com/google/uuid"
)
func main() {
ctx := context.Background()
cmd := commander.New(10)
c1 := GetName{UID: uuid.NewString()}
c2 := GetAddress{Input: &c1.Result}
commands := []commander.Command{&c1, &c2}
if err := cmd.Execute(ctx, "", commands...); err != nil {
panic(err)
}
fmt.Println(c2.Result)
}