Skip to content

Commit c2b4096

Browse files
committed
Make the singleton 'tools' a pointer
1 parent 6cc7a9e commit c2b4096

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
)
@@ -252,7 +252,7 @@ func loop() {
252252

253253
// Instantiate Index and Tools
254254
Index = index.Init(*indexURL, config.GetDataDir())
255-
Tools = *tools.New(config.GetDataDir(), Index, logger)
255+
Tools = tools.New(config.GetDataDir(), Index, logger)
256256

257257
// see if we are supposed to wait 5 seconds
258258
if *isLaunchSelf {

0 commit comments

Comments
 (0)