Skip to content

Commit 9f00a00

Browse files
committed
gobuffalo/envy
1 parent cf3b3d7 commit 9f00a00

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/go-all
4+
extensible: sourceModel
5+
data:
6+
- ["github.com/gobuffalo/envy", "", False, "Environ", "", "", "ReturnValue", "environment", "manual"]
7+
- ["github.com/gobuffalo/envy", "", False, "Get", "", "", "ReturnValue", "environment", "manual"]
8+
- ["github.com/gobuffalo/envy", "", False, "GoPath", "", "", "ReturnValue", "environment", "manual"]
9+
- ["github.com/gobuffalo/envy", "", False, "GoPaths", "", "", "ReturnValue", "environment", "manual"]
10+
- ["github.com/gobuffalo/envy", "", False, "GoBin", "", "", "ReturnValue", "environment", "manual"]
11+
- ["github.com/gobuffalo/envy", "", False, "Map", "", "", "ReturnValue", "environment", "manual"]
12+
- ["github.com/gobuffalo/envy", "", False, "MustGet", "", "", "ReturnValue[0]", "environment", "manual"]

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package test
33
import (
44
"fmt"
55
"github.com/caarlos0/env"
6+
"github.com/gobuffalo/envy"
67
"github.com/hashicorp/go-envparse"
78
"github.com/joho/godotenv"
89
"github.com/kelseyhightower/envconfig"
@@ -86,3 +87,13 @@ func caarlos0EnvironmentVariables() {
8687

8788
fmt.Printf("HOME: %s\n", cfg.Home)
8889
}
90+
91+
func envyEnvironmentVariables() {
92+
goPath := envy.GoPath() // $ source
93+
94+
fmt.Printf("GOPATH: %s\n", goPath)
95+
96+
homeDir := envy.MustGet("HOME") // $ source
97+
98+
fmt.Printf("HOME: %s\n", homeDir)
99+
}

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/vendor/github.com/gobuffalo/envy/stub.go

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)