-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix broken FTL examples #872
Conversation
fc63fb8
to
1987720
Compare
examples/go/echo/echo.go
Outdated
func Echo(ctx context.Context, req EchoRequest) (EchoResponse, error) { | ||
fmt.Println("Echo received a request!") | ||
tresp, err := sdk.Call(ctx, time.Time, time.TimeRequest{}) | ||
if err != nil { | ||
return EchoResponse{}, err | ||
} | ||
return EchoResponse{Message: fmt.Sprintf("Hello, %s!!! It is %s!", req.Name.Default("anonymous"), tresp.Time)}, nil | ||
return EchoResponse{Message: fmt.Sprintf("Hello, %s!!! It is %s!", req.Name.Default("anonymous"), tresp)}, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct?
return when { | ||
req.contextKeys != null -> AdResponse(ads = contextualAds(req.contextKeys)) | ||
else -> AdResponse(ads = randomAds()) | ||
@Ingress(Method.GET, "/get", HTTP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, we should get rid of HTTP
and call this @HttpIngress
. It's not going to be usable for any other type such as gRPC anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good call. I'll make a ticket to clean this up.
#874
1987720
to
60f5e57
Compare
No description provided.