Skip to content

Commit ab4e8ed

Browse files
remove comments
1 parent 12a18d0 commit ab4e8ed

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

test/integration/env/env.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77
)
88

9-
// Key is a declared environment variable name.
109
type Key string
1110

1211
const (
@@ -16,12 +15,10 @@ const (
1615
CI Key = "CI"
1716
)
1817

19-
// Get returns the value of the given environment variable.
2018
func Get(key Key) string {
2119
return os.Getenv(string(key))
2220
}
2321

24-
// Require returns the value of the given environment variable, failing the test if it is not set.
2522
func Require(t testing.TB, key Key) string {
2623
t.Helper()
2724
v := os.Getenv(string(key))
@@ -31,20 +28,16 @@ func Require(t testing.TB, key Key) string {
3128
return v
3229
}
3330

34-
// Environ is a slice of "KEY=value" environment variable strings.
3531
type Environ []string
3632

37-
// Without returns the current process environment excluding the given keys.
3833
func Without(keys ...Key) Environ {
3934
return Environ(os.Environ()).Without(keys...)
4035
}
4136

42-
// With returns the current process environment with key=value appended.
4337
func With(key Key, value string) Environ {
4438
return Environ(os.Environ()).With(key, value)
4539
}
4640

47-
// Without returns a copy of e excluding any variable whose key matches one of the given keys.
4841
func (e Environ) Without(keys ...Key) Environ {
4942
var result Environ
5043
for _, entry := range e {
@@ -62,7 +55,6 @@ func (e Environ) Without(keys ...Key) Environ {
6255
return result
6356
}
6457

65-
// With returns a copy of e with key=value appended.
6658
func (e Environ) With(key Key, value string) Environ {
6759
return append(e, string(key)+"="+value)
6860
}

0 commit comments

Comments
 (0)