-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
29 lines (24 loc) · 797 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import (
"context"
"fmt"
"github.com/remychantenay/pkl-playground/internal/config"
)
func main() {
loadConfig()
}
func loadConfig() {
cfg, err := config.LoadFromPath(context.Background(), "pkl/config.pkl")
if err != nil {
panic(err)
}
println(fmt.Sprintf("SomeInteger: %d", cfg.SomeInteger))
println(fmt.Sprintf("SomeString: %s", cfg.SomeString))
println(fmt.Sprintf("Tabs (list): %v", cfg.Tabs))
println(fmt.Sprintf("Components (map): %v", cfg.Components))
println(fmt.Sprintf("FullList (list): %v", cfg.FullList))
println(fmt.Sprintf("Multiplied (list): %v", cfg.MultipliedList))
println(fmt.Sprintf("Filtered (list): %v", cfg.FilteredList))
println(fmt.Sprintf("Reversed (list): %v", cfg.ReversedList))
println(fmt.Sprintf("FirstItem: %v", cfg.FirstItem))
}