https://github.com/hmsk/netlify-functions-in-go
Deployable template of multiple Go lambda functions for Netlify Functions
https://github.com/hmsk/netlify-functions-in-go
Last synced: 3 months ago
JSON representation
Deployable template of multiple Go lambda functions for Netlify Functions
- Host: GitHub
- URL: https://github.com/hmsk/netlify-functions-in-go
- Owner: hmsk
- License: mit
- Created: 2020-02-09T07:33:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-11T07:33:24.000Z (over 4 years ago)
- Last Synced: 2025-03-16T00:00:01.894Z (3 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Netlify Functions in Go
Deployable template of multiple Go lambda functions for [Netlify Functions](https://www.netlify.com/products/functions/).
[](https://app.netlify.com/start/deploy?repository=https://github.com/hmsk/netlify-functions-in-go)
## File structure
```
├── Makefile
├── cmd
│ ├── goodbye
│ │ └── main.go
│ └── hello
│ └── main.go
├── dashboard
│ └── index.html
├── internal
│ └── pkg
│ └── utils
│ └── utils.go
└── netlify.toml
```### `cmd`
Place your functions. A dir matches to an end-point: `/.netlify/functions/hello`.
Each dir should have `main.go` as `package main`.### `internal/pkg`
Place your common package for sharing among multiple functions.
In this sample, `utils/utils.go` provides `utils.IntroductionYourself` for `hello`, `goodbye` endpoints.### `dashboard`
This dir will be deployed as a website. The root path for your Netlify app brings visitors here.
Put HTML/assets...etc to support your functions 💪## Development
### Build
```
$ make
```Try to build packages and saves Go binaries into `functions` dir.
### Run tests
```
$ make test
```## License
[MIT License](LICENSE) Copyright (c) 2020 Kengo Hamasaki