Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 02d1472

Browse files
committed
add yaml module
1 parent f4c7a0f commit 02d1472

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

cmd/rudi/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ require (
88
github.com/spf13/pflag v1.0.5
99
go.xrstf.de/go-term-markdown v0.0.0-20231119170546-73a1852b91cc
1010
go.xrstf.de/rudi v0.1.0
11-
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203191548-aba8974ae9a2
11+
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203192305-a1898e2e54e2
12+
go.xrstf.de/rudi-contrib/yaml v0.0.0-20231203192305-a1898e2e54e2
1213
gopkg.in/yaml.v3 v3.0.1
1314
)
1415

cmd/rudi/go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ github.com/xrstf/colorjson v0.0.0-20231123184920-5ea6fecf578f h1:gVBqsyWwyxxzSGj
3939
github.com/xrstf/colorjson v0.0.0-20231123184920-5ea6fecf578f/go.mod h1:AY6XdslHQYqT5ivYt21gXNpCjsck8iEoytnNfz3COxY=
4040
go.xrstf.de/go-term-markdown v0.0.0-20231119170546-73a1852b91cc h1:0vqYzllpoI4x5V4QPCN3LWL/kmAdxl7gXf3OchayNSw=
4141
go.xrstf.de/go-term-markdown v0.0.0-20231119170546-73a1852b91cc/go.mod h1:0bARjSNhCWOffbH9lX3J7QoLkjuTf3oEV8OhZHPenMg=
42-
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203191548-aba8974ae9a2 h1:ko2wkZHb8V4CZx0V7pBKE87EykjcceaYNXPhAs/NpuE=
43-
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203191548-aba8974ae9a2/go.mod h1:pIxgeSQ2X+34H+hiZFUUw+xnzwjt5OTuM69M6/w8MDc=
42+
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203192305-a1898e2e54e2 h1:XUFm6DuTZ2ypq9d6ATWLwMbo7Op68xOmCRoWb7kkkXU=
43+
go.xrstf.de/rudi-contrib/semver v0.0.0-20231203192305-a1898e2e54e2/go.mod h1:pIxgeSQ2X+34H+hiZFUUw+xnzwjt5OTuM69M6/w8MDc=
44+
go.xrstf.de/rudi-contrib/yaml v0.0.0-20231203192305-a1898e2e54e2 h1:8CFFt6xW1xC5E5I1hMOMsjzMj/XnDvSRGoL8fjYjiDk=
45+
go.xrstf.de/rudi-contrib/yaml v0.0.0-20231203192305-a1898e2e54e2/go.mod h1:XSHDq7P5S3Xa+tfiuNk9w8MnDpAqO3p2FSo8eNQWPnc=
4446
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4547
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4648
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

cmd/rudi/util/rudi.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import (
77
"fmt"
88

99
"go.xrstf.de/rudi"
10-
"go.xrstf.de/rudi-contrib/semver"
1110
"go.xrstf.de/rudi/cmd/rudi/types"
1211
"go.xrstf.de/rudi/pkg/coalescing"
12+
13+
"go.xrstf.de/rudi-contrib/semver"
14+
"go.xrstf.de/rudi-contrib/yaml"
1315
)
1416

1517
func SetupRudiContext(opts *types.Options, files []any) (rudi.Context, error) {
@@ -43,7 +45,8 @@ func SetupRudiContext(opts *types.Options, files []any) (rudi.Context, error) {
4345
}
4446

4547
funcs := rudi.NewBuiltInFunctions().
46-
Add(semver.Functions)
48+
Add(semver.Functions).
49+
Add(yaml.Functions)
4750

4851
ctx := rudi.NewContext(document, vars, funcs, coalescer)
4952

0 commit comments

Comments
 (0)