-
Notifications
You must be signed in to change notification settings - Fork 1
/
funcSetGitConfigFile.go
60 lines (59 loc) · 1.24 KB
/
funcSetGitConfigFile.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package iotmakerdockerbuilder
// SetGitConfigFile
//
// English:
//
// Defines the contents of the .gitconfig file
//
// Input:
// value: .gitconfig file contents
//
// Example:
//
// var err error
// var usr *user.User
// var path string
// var file []byte
// usr, err = user.Current()
// if err != nil {
// panic(err)
// }
//
// path = filepath.Join(usr.HomeDir, ".gitconfig")
// file, err = ioutil.ReadFile(path)
// if err != nil {
// panic(err)
// }
//
// var container = ContainerBuilder{}
// container.SetGitConfigFile(string(file))
//
// Português:
//
// Define o conteúdo do arquivo .gitconfig
//
// Entrada:
// value: conteúdo do arquivo .gitconfig
//
// Exemplo:
//
// var err error
// var usr *user.User
// var path string
// var file []byte
// usr, err = user.Current()
// if err != nil {
// panic(err)
// }
//
// path = filepath.Join(usr.HomeDir, ".gitconfig")
// file, err = ioutil.ReadFile(path)
// if err != nil {
// panic(err)
// }
//
// var container = ContainerBuilder{}
// container.SetGitConfigFile(string(file))
func (e *ContainerBuilder) SetGitConfigFile(value string) {
e.contentGitConfigFile = value
}