Skip to content

Commit 62c3b75

Browse files
committed
Make the singleton 'tools' a pointer
1 parent 3c3674d commit 62c3b75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func uploadHandler(c *gin.Context) {
161161

162162
go func() {
163163
// Resolve commandline
164-
commandline, err := upload.PartiallyResolve(data.Board, filePath, tmpdir, data.Commandline, data.Extra, &Tools)
164+
commandline, err := upload.PartiallyResolve(data.Board, filePath, tmpdir, data.Commandline, data.Extra, Tools)
165165
if err != nil {
166166
send(map[string]string{uploadStatusStr: "Error", "Msg": err.Error()})
167167
return

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var homeTemplateHTML string
102102

103103
// global clients
104104
var (
105-
Tools tools.Tools
105+
Tools *tools.Tools
106106
Systray systray.Systray
107107
Index *index.Resource
108108
)
@@ -192,7 +192,7 @@ func loop() {
192192
}
193193

194194
// Instantiate Tools
195-
Tools = *tools.New(config.GetDataDir(), Index, logger)
195+
Tools = tools.New(config.GetDataDir(), Index, logger)
196196

197197
// Let's handle the config
198198
configDir := config.GetDefaultConfigDir()

0 commit comments

Comments
 (0)