Skip to content

Commit 4de04e7

Browse files
committed
Add const that holds ECS Metadata File env var name
1 parent 7e9434e commit 4de04e7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version := vresolver.Compose(
2222
vresolver r.Env,
2323
vresolver.ECS,
2424
vresolver.Fallback("bulk-version"),
25-
)("ECS_CONTAINER_METADATA_FILE")
25+
)(vresolver.ECSMetadataFileEnvVar)
2626

2727
```
2828

ecs.go

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import (
66
"strings"
77
)
88

9+
// ECSMetadataFileEnvVar contains the default env var
10+
// name that points to the container metadata file
11+
const ECSMetadataFileEnvVar = "ECS_CONTAINER_METADATA_FILE"
12+
913
// ECS extracts the tag of the Docker image in use.
1014
// See AWS ECS Container Metadata File: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html
1115
func ECS(file string) string {

0 commit comments

Comments
 (0)