aws-amplify / aws-amplify/amplify-cli

Build go function fails if there are more than main.go in src

Open
#13,725 8 comments 0 reactions 1 assignee Claimed by @0618 View on GitHub
bug functions p2
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

yarn

### If applicable, what version of Node.js are you using?

20

### Amplify CLI Version

12.11.1

### What operating system are you using?

Ubuntu

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

### Describe the bug

This change [here](https://github.com/aws-amplify/amplify-cli/pull/13671/files#diff-9e8ed84544b6574832f1d34bde8bc4fffff3558a54806adb09b4884758ff618aR105) fails go function build if there are more than main.go in src.

### Expected behavior

Go function should be built

### Reproduction steps

1. Create a lambda function using go
2. in main.go use a function defined in another.go
3. Build will fail

### Project Identifier

_No response_

### Log output

_No response_

### Additional information

_No response_

### Before submitting, please confirm:

- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.