File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 62
62
// ...
63
63
//
64
64
// // When you need to uninstall.
65
- // if err := host.Uninstall(); err != nil {
66
- // log.Printf("uninstall error: %v", err)
67
- // }
65
+ // host.Uninstall()
68
66
//
69
67
// * Auto Update Configuration
70
68
//
@@ -98,13 +96,23 @@ import (
98
96
"encoding/binary"
99
97
"encoding/json"
100
98
"io"
99
+ "io/ioutil"
101
100
"os"
102
101
"path"
103
102
"path/filepath"
104
103
"runtime"
105
104
"strings"
106
105
)
107
106
107
+ // ioutilWriteFile is a shortcut to ioutil.WriteFile. It helps write testable code.
108
+ var ioutilWriteFile = ioutil .WriteFile
109
+
110
+ // osMkdirAll is a shortcut to os.MkdirAll. It helps write testable code.
111
+ var osMkdirAll = os .MkdirAll
112
+
113
+ // runtimeGoexit is a shortcut to runtime.Goexit. It helps write testable code.
114
+ var runtimeGoexit = runtime .Goexit
115
+
108
116
// H is a map[string]interface{} type shortcut and represents a dynamic
109
117
// key-value-pair data.
110
118
type H map [string ]interface {}
@@ -123,9 +131,6 @@ type Host struct {
123
131
Version string `json:"-"`
124
132
}
125
133
126
- // runtimeGoexit is a shortcut to runtime.Goexit. It helps write testable code.
127
- var runtimeGoexit = runtime .Goexit
128
-
129
134
// Init sets default value to its fields and return the Host pointer back.
130
135
//
131
136
// * AppName is an application name in manifest file and will be defaulted to
You can’t perform that action at this time.
0 commit comments