Debian Codegraph @

config/delayed_environment.go

raw symbols SCIP
1 package configscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/
2
3 import (
4 "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/"
5 )
6
7 // delayedEnvironment is an implementation of the Environment which wraps the legacy
8 // behavior of `*config.Configuration.loadGitConfig()`.
9 //
10 // It is functionally equivalent to call `cfg.loadGitConfig()` before calling
11 // methods on the Environment type.
12 type delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment# struct {
13 envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env. Environmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#
14 loadingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#loading. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
15 callbackscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#callback. func() Environmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#
16 }
17
18 // Get is shorthand for calling the e.Load(), and then returning
19 // `e.env.Get(key)`.
20 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Getscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Get().(key string) (string, bool) {
21 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
22 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..Getscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#Get.(key)
23 }
24
25 // Get is shorthand for calling the e.Load(), and then returning
26 // `e.env.GetAll(key)`.
27 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) GetAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#GetAll().(key string) []string {
28 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
29 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..GetAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#GetAll.(key)
30 }
31
32 // Get is shorthand for calling the e.Load(), and then returning
33 // `e.env.Bool(key, def)`.
34 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Boolscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Bool().(key string, def bool) bool {
35 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
36 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..Boolscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#Bool.(key, def)
37 }
38
39 // Get is shorthand for calling the e.Load(), and then returning
40 // `e.env.Int(key, def)`.
41 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Intscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Int().(key string, def int) int {
42 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
43 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..Intscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#Int.(key, def)
44 }
45
46 // Int64 is shorthand for calling the e.Load(), and then returning
47 // `e.env.Int64(key, def)`.
48 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Int64scip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Int64().(key string, def int64) int64 {
49 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
50 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..Int64scip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#Int64.(key, def)
51 }
52
53 // All returns a copy of all the key/value pairs for the current git config.
54 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Allscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#All().() map[string][]string {
55 e.Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().()
56 return e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env..Allscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Environment#All.()
57 }
58
59 // Load reads and parses the .gitconfig by calling ReadGitConfig. It
60 // also sets values on the configuration instance `g.config`.
61 //
62 // If Load has already been called, this method will bail out early,
63 // and return false. Otherwise it will perform the entire parse and return true.
64 //
65 // Load is safe to call across multiple goroutines.
66 func (e *delayedEnvironmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#) Loadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#Load().() {
67 e.loadingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#loading..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
68 defer e.loadingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#loading..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
69
70 if e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env. != nil {
71 return
72 }
73
74 e.envscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#env. = e.callbackscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/delayedEnvironment#callback.()
75 }