mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-10-31 12:16:29 +08:00 
			
		
		
		
	linting fixes
This commit is contained in:
		 0xdcarns
					0xdcarns
				
			
				
					committed by
					
						 Matthew R Kasun
						Matthew R Kasun
					
				
			
			
				
	
			
			
			 Matthew R Kasun
						Matthew R Kasun
					
				
			
						parent
						
							40302b3a17
						
					
				
				
					commit
					2fcd874738
				
			| @@ -21,6 +21,7 @@ func Daemon() error { | |||||||
| 	ctx, cancel := context.WithCancel(context.Background()) | 	ctx, cancel := context.WithCancel(context.Background()) | ||||||
| 	networks, err := ncutils.GetSystemNetworks() | 	networks, err := ncutils.GetSystemNetworks() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | 		cancel() | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	for _, network := range networks { | 	for _, network := range networks { | ||||||
| @@ -55,7 +56,7 @@ func Netclient(ctx context.Context, network string) { | |||||||
| 	cfg.ReadConfig() | 	cfg.ReadConfig() | ||||||
| 	//fix NodeID to remove ### so NodeID can be used as message topic | 	//fix NodeID to remove ### so NodeID can be used as message topic | ||||||
| 	//remove with GRA-73 | 	//remove with GRA-73 | ||||||
| 	cfg.Node.ID = strings.ReplaceAll(cfg.Node.ID, "###", "-") | 	cfg.Node.ID = strings.Replace(cfg.Node.ID, "###", "-", 1) | ||||||
| 	ncutils.Log("daemon started for network:" + network) | 	ncutils.Log("daemon started for network:" + network) | ||||||
| 	client := SetupMQTT(cfg) | 	client := SetupMQTT(cfg) | ||||||
| 	if token := client.Subscribe("#", 0, nil); token.Wait() && token.Error() != nil { | 	if token := client.Subscribe("#", 0, nil); token.Wait() && token.Error() != nil { | ||||||
| @@ -69,8 +70,6 @@ func Netclient(ctx context.Context, network string) { | |||||||
| 	go Metrics(ctx, cfg, network) | 	go Metrics(ctx, cfg, network) | ||||||
| 	<-ctx.Done() | 	<-ctx.Done() | ||||||
| 	ncutils.Log("shutting down daemon") | 	ncutils.Log("shutting down daemon") | ||||||
| 	return |  | ||||||
| 	ncutils.Log("netclient go routine ended for " + network) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| // All -- mqtt message hander for all ('#') topics | // All -- mqtt message hander for all ('#') topics | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user