Skip to content

Commit

Permalink
re-add external module to testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Oct 2, 2024
1 parent 7784ab8 commit 10003ef
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/buildengine/testdata/external/external.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//ftl:module external
package external

import (
"context"
"time"
)

type ExternalRequest struct{}
type ExternalResponse struct {
Month time.Month // external type should not be allowed
}

// External returns the current month as an external type.
//
//ftl:verb
func Time(ctx context.Context, req ExternalRequest) (ExternalResponse, error) {
return ExternalResponse{Month: time.Now().Month()}, nil
}
2 changes: 2 additions & 0 deletions internal/buildengine/testdata/external/ftl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module = "external"
language = "go"
5 changes: 5 additions & 0 deletions internal/buildengine/testdata/external/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module ftl/external

go 1.23.0

replace github.com/TBD54566975/ftl => ../../../..
Empty file.

0 comments on commit 10003ef

Please sign in to comment.