store: local store
This just returns the verbatim string.
This commit is contained in:
parent
e0278a6d7d
commit
b6961508e8
6
store.go
6
store.go
@ -12,6 +12,12 @@ type Store interface {
|
||||
fmt.Stringer
|
||||
}
|
||||
|
||||
// Local points to a local filesystem path containing a nix store.
|
||||
type Local string
|
||||
|
||||
func (Local) Environ() []string { return nil }
|
||||
func (store Local) String() string { return string(store) }
|
||||
|
||||
const (
|
||||
EnvAwsSharedCredentialsFile = "AWS_SHARED_CREDENTIALS_FILE"
|
||||
)
|
||||
|
@ -6,6 +6,16 @@ import (
|
||||
"gensokyo.uk/nix"
|
||||
)
|
||||
|
||||
func TestLocal(t *testing.T) {
|
||||
if got := nix.Local("/").String(); got != "/" {
|
||||
t.Errorf("String: %v, want %v", got, "/")
|
||||
}
|
||||
|
||||
if got := nix.Local("").Environ(); got != nil {
|
||||
t.Errorf("Environ: %v, want %v", got, nil)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBinaryCache(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
|
Loading…
x
Reference in New Issue
Block a user