https://github.com/lemon-mint/envaddr
Get Listen Address From env
https://github.com/lemon-mint/envaddr
Last synced: 3 months ago
JSON representation
Get Listen Address From env
- Host: GitHub
- URL: https://github.com/lemon-mint/envaddr
- Owner: lemon-mint
- License: unlicense
- Created: 2022-01-15T10:42:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T12:06:46.000Z (almost 3 years ago)
- Last Synced: 2025-01-20T10:11:50.339Z (5 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# envaddr
Get Listen Address From env``` shell
go get -u github.com/lemon-mint/envaddr
`````` go
func Get(defaultAddr string) string
```This function attempts to get the address from the environment variables `PORT`, `HOST` and `IP`.
If none of these are set, it returns the default address.