MCPcopy Create free account
hub / github.com/libgit2/git2go / setupConfig

Function setupConfig

config_test.go:10–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8var tempConfig = "./temp.gitconfig"
9
10func setupConfig() (*Config, error) {
11 var (
12 c *Config
13 err error
14 )
15
16 c, err = OpenOndisk(tempConfig)
17 if err != nil {
18 return nil, err
19 }
20
21 err = c.SetString("foo.bar", "baz")
22 if err != nil {
23 return nil, err
24 }
25 err = c.SetBool("foo.bool", true)
26 if err != nil {
27 return nil, err
28 }
29 err = c.SetInt32("foo.int32", 32)
30 if err != nil {
31 return nil, err
32 }
33 err = c.SetInt64("foo.int64", 64)
34 if err != nil {
35 return nil, err
36 }
37
38 return c, err
39}
40
41func cleanupConfig() {
42 os.Remove(tempConfig)

Callers 1

TestConfigLookupsFunction · 0.85

Calls 5

OpenOndiskFunction · 0.85
SetStringMethod · 0.80
SetBoolMethod · 0.80
SetInt32Method · 0.80
SetInt64Method · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…