mirror of
https://github.com/andwati/dns-resolver.git
synced 2026-10-18 10:42:52 +00:00
completed data structures
This commit is contained in:
@@ -1,21 +1,33 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
type DNSHeader struct {
|
||||||
"fmt"
|
ID uint16
|
||||||
)
|
Flags uint16
|
||||||
|
QDCount uint16
|
||||||
|
ANCount uint16
|
||||||
|
NSCount uint16
|
||||||
|
ARCount uint16
|
||||||
|
}
|
||||||
|
|
||||||
//TIP <p>To run your code, right-click the code and select <b>Run</b>.</p> <p>Alternatively, click
|
type DNSQuestion struct {
|
||||||
// the <icon src="AllIcons.Actions.Execute"/> icon in the gutter and select the <b>Run</b> menu item from here.</p>
|
QName string
|
||||||
|
QType uint16
|
||||||
|
QClass uint16
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
type DNSRecord struct {
|
||||||
//TIP <p>Press <shortcut actionId="ShowIntentionActions"/> when your caret is at the underlined text
|
Name string
|
||||||
// to see how GoLand suggests fixing the warning.</p><p>Alternatively, if available, click the lightbulb to view possible fixes.</p>
|
Type uint16
|
||||||
s := "gopher"
|
Class uint16
|
||||||
fmt.Println("Hello and welcome, %s!", s)
|
TTL uint32
|
||||||
|
RDLength uint16
|
||||||
|
RData []byte
|
||||||
|
}
|
||||||
|
|
||||||
for i := 1; i <= 5; i++ {
|
type DNSMessage struct {
|
||||||
//TIP <p>To start your debugging session, right-click your code in the editor and select the Debug option.</p> <p>We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
Header DNSHeader
|
||||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.</p>
|
Question []DNSQuestion
|
||||||
fmt.Println("i =", 100/i)
|
Answers []DNSRecord
|
||||||
}
|
Authorities []DNSRecord
|
||||||
}
|
Additionals []DNSRecord
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
package main
|
||||||
Reference in New Issue
Block a user