diff --git a/main.go b/main.go index 71ae5c9..4c9abe8 100644 --- a/main.go +++ b/main.go @@ -1,21 +1,33 @@ package main -import ( - "fmt" -) +type DNSHeader struct { + ID uint16 + Flags uint16 + QDCount uint16 + ANCount uint16 + NSCount uint16 + ARCount uint16 +} -//TIP

To run your code, right-click the code and select Run.

Alternatively, click -// the icon in the gutter and select the Run menu item from here.

+type DNSQuestion struct { + QName string + QType uint16 + QClass uint16 +} -func main() { - //TIP

Press when your caret is at the underlined text - // to see how GoLand suggests fixing the warning.

Alternatively, if available, click the lightbulb to view possible fixes.

- s := "gopher" - fmt.Println("Hello and welcome, %s!", s) +type DNSRecord struct { + Name string + Type uint16 + Class uint16 + TTL uint32 + RDLength uint16 + RData []byte +} - for i := 1; i <= 5; i++ { - //TIP

To start your debugging session, right-click your code in the editor and select the Debug option.

We have set one breakpoint - // for you, but you can always add more by pressing .

- fmt.Println("i =", 100/i) - } -} \ No newline at end of file +type DNSMessage struct { + Header DNSHeader + Question []DNSQuestion + Answers []DNSRecord + Authorities []DNSRecord + Additionals []DNSRecord +} diff --git a/utilities.go b/utilities.go new file mode 100644 index 0000000..06ab7d0 --- /dev/null +++ b/utilities.go @@ -0,0 +1 @@ +package main