func QCLASS(d dns.DNS, num int) { field, err := d.GetQCLASS(num) if err != nil { fmt.Println(err.Error(), "\n") return } fmt.Printf("QCLASS: ") switch field { case 1: fmt.Println("IN") case 2: fmt.Println("CS") case 3: fmt.Println("CH") case 4: fmt.Println("HS") case 255: fmt.Println("*") default: fmt.Printf("NOT VALID %d \n", field) } }