Very simple question. I copy pasted the golang examples of cdk8s right from the documentation. Source. Detail of the error below.
I went to the pkg.go site for cdk8s and did not find this type. I'm not a newbie to go, but I'm also not an expert. So here's my question.
Is this a problem on my end, or a problem with the example?
The example with the webservice fails with the error:
❯ cdk8s synth
Synthesizing application
# example.com/cdk8s-example
./webservice.go:10:13: undefined: constructs.ConstructOptions
./webservice.go:18:24: undefined: constructs.ConstructOptions
Error: ...
Today's date is 2023-02-15 and the relevant example code looks like this:
package main
import (
"example.com/hello/imports/k8s"
"github.com/aws/constructs-go/constructs/v10"
"github.com/aws/jsii-runtime-go"
)
type WebServiceProps struct {
constructs.ConstructOptions // <-- this doesn't exist?
Image *string
Replicas *float64
Port *float64
ContainerPort *float64
}
func NewWebService(scope constructs.Construct, id *string, props *WebServiceProps) constructs.Construct {
var cprops constructs.ConstructOptions // <-- this doesn't exist?
if props != nil {
cprops = props.ConstructOptions
}
...