You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is the echo module.package echo
import (
"context""fmt""ftl/time""github.com/TBD54566975/ftl/go-runtime/ftl"
)
vardefaultName= ftl.Config[string]("default")
typeSomeInterfaceinterface {
A() string
}
typeThingstruct{}
func (tThing) A() string {
return"thing"
}
// An echo request.typeEchoRequeststruct {
Name ftl.Option[string] `json:"name"`
}
typeEchoResponsestruct {
Messagestring`json:"message"`
}
// Echo returns a greeting with the current time.////ftl:verbfuncEcho(ctx context.Context, reqEchoRequest) (EchoResponse, error) {
tresp, err:=ftl.Call(ctx, time.Time, time.TimeRequest{})
iferr!=nil {
returnEchoResponse{}, err
}
returnEchoResponse{Message: fmt.Sprintf("Hello, %s!!! It is %s!", req.Name.Default(defaultName.Get(ctx)), tresp.Time)}, nil
}
run ftl dev --recreate ./examples/go
Output
❯ ftl dev --recreate ./examples/go
info: Starting FTL with 1 controller(s)
info:controller0: Web console available at: http://localhost:8892
info:controller0: HTTP ingress server listening on: http://localhost:8891
info: FTL startup command ⚡️
info:time: Building module
info:time: Deploying module
info:echo: Building module
info:controller0: Deployed dpl-time-5cblpvv3s76l8ufx
info: Modules waiting to build: echo
error: initial deploy failed: /path/to/ftl/examples/go/echo/echo.go:19:1-20: could not find enum called SomeInterface
Expected Behavior
error: initial deploy failed: /ftl/examples/go/echo/echo.go:19:1-20: could not find enum called SomeInterface
The text was updated successfully, but these errors were encountered:
Repro
examples/go/echo/echo.go
with the followingftl dev --recreate ./examples/go
Output
Expected Behavior
error: initial deploy failed: /ftl/examples/go/echo/echo.go:19:1-20: could not find enum called SomeInterfaceThe text was updated successfully, but these errors were encountered: