diff --git a/gofrompython/README.md b/gofrompython/README.md index ffc59d2..a117e60 100644 --- a/gofrompython/README.md +++ b/gofrompython/README.md @@ -44,7 +44,7 @@ that file has a `func main()` declared, that funciton will not be called. You can [view the source here](./src/dns/dnscmd/dnscmd.go), and below: -``` +```go package main import ( @@ -60,7 +60,7 @@ func main() { You can [view the source of the library here](./src/dns/dnslib/dnslib.go) and below. Note that the spacing of the `//export` is specific - there should be no space between the `//` and the `export` text: -``` +```go package dnslib import ( @@ -72,7 +72,7 @@ import ( func ReturnString(val string) *C.char { cname, err := net.LookupCNAME(val) if err != nil { - C.CString("Could not find CNAME") + return C.CString("Could not find CNAME") } return C.CString(cname) } diff --git a/gofrompython/src/dns/dnslib/dnslib.go b/gofrompython/src/dns/dnslib/dnslib.go index 325d5b0..01c0a55 100644 --- a/gofrompython/src/dns/dnslib/dnslib.go +++ b/gofrompython/src/dns/dnslib/dnslib.go @@ -22,7 +22,7 @@ import ( func ReturnString(val string) *C.char { cname, err := net.LookupCNAME(val) if err != nil { - C.CString("Could not find CNAME") + return C.CString("Could not find CNAME") } return C.CString(cname) }