mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Fix getSelf in yggdrasilctl
This commit is contained in:
		
							parent
							
								
									088d28a93b
								
							
						
					
					
						commit
						4f435705e3
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -181,6 +181,13 @@ func main() {
 | 
			
		|||
			}
 | 
			
		||||
		case "getself":
 | 
			
		||||
			for k, v := range res["self"].(map[string]interface{}) {
 | 
			
		||||
				if friendlyname, ok := v.(map[string]interface{})["friendly_name"].(string); ok {
 | 
			
		||||
					if friendlyname == "" {
 | 
			
		||||
						fmt.Println("Friendly name: (none)")
 | 
			
		||||
					} else {
 | 
			
		||||
						fmt.Println("Friendly name:", friendlyname)
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				fmt.Println("IPv6 address:", k)
 | 
			
		||||
				if subnet, ok := v.(map[string]interface{})["subnet"].(string); ok {
 | 
			
		||||
					fmt.Println("IPv6 subnet:", subnet)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue