This is an example application using Apple's new Pickle (Pkl) framework.
A config
package is automatically generated from the config/config.pkl
file
in the same directory. The command is:
pkl-gen-go config/config.pkl --base-path github.com/mkock/pklgo
In order to load, validate and parse the configuration, the package github.com/apple/pkl-go
is required.
The configuration file itself is fairly straightforward, but it does require a couple of annotations and a funky import statement:
import "package://pkg.pkl-lang.org/pkl-go/[email protected]#/go.pkl"
The class definitions are important to achieve the correct types in the generated code, otherwise they
will all have type any
.