Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Simple

This is a simple web service that uses Pkl to drive configuration.

Project structure

Directory Description

pkl/

Pkl configuration sources

gen/

Generated Go sources from Pkl

internal/

Internal Go files

cmd/

Server entrypoint

Codegen

To generate new Pkl sources for the AppConfig module, run:

go tool pkl-gen-go pkl/AppConfig.pkl

Or, alternatively, with go generate (see generate.go):

go generate ./...

The code generator detects that the Go package for AppConfig is github.com/apple/pkl-go-examples/simple/gen/appconfig, and the Go module name is github.com/apple/pkl-go-examples (via the go.mod file), and therefore places generated sources in gen/appconfig.