Skip to content

Commit 884d0b3

Browse files
committed
replace value by pointer
1 parent 3db6741 commit 884d0b3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

config/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func generateDefaultConfig() {
3838
log.Panic("Failed to create configuration file:", err.Error())
3939
}
4040
Config = configMain{
41-
Services: []ConfigProxyService{
41+
Services: []*ConfigProxyService{
4242
{
4343
Name: "HypixelDefault",
4444
TargetAddress: "mc.hypixel.net",

config/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package config
22

33
type configMain struct {
4-
Services []ConfigProxyService
4+
Services []*ConfigProxyService
55
}
66

77
type ConfigProxyService struct {

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ func main() {
2525

2626
config.LoadConfig()
2727

28-
group := sync.WaitGroup{}
28+
group := &sync.WaitGroup{}
2929
for _, s := range config.Config.Services {
3030
group.Add(1)
31-
go service.StartNewService(&s, &group)
31+
go service.StartNewService(s, group)
3232
}
33-
(&group).Wait()
33+
group.Wait()
3434
}

0 commit comments

Comments
 (0)