Skip to content

Commit

Permalink
docs: ExampleBuilder_build and doc.go
Browse files Browse the repository at this point in the history
  • Loading branch information
borgoat committed Apr 13, 2021
1 parent 9366bbb commit 8a0f519
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,27 @@ func TestBuild_go(t *testing.T) {
t.Fatal(err)
}
}

func ExampleBuilder_Build() error {
c, err := NewClient()
if err != nil {
return err
}

b, err := c.NewBuilder("go", "modules", "")
if err != nil {
return err
}

err = b.Build(
"/path/to/source",
"/path/to/compile",
"/path/to/scratchdir",
"/path/to/source/go.mod",
lambdabuilders.WithRuntime("go1.x"),
lambdabuilders.WithOptions(map[string]interface{}{
"artifact_executable_name": "my-handler",
}),
)
return err
}
4 changes: 4 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Package lambdabuilders uses aws-lambda-builders to build Lambda functions.
//
// It wraps aws-lambda-builders, using its JSON-RPC API to delegate the actual workflow of building Lambda functions.
package lambdabuilders

0 comments on commit 8a0f519

Please sign in to comment.