Files
codeql/ql/src/RedundantCode/ImpossibleInterfaceNilCheck.go
2019-11-26 20:28:53 +00:00

17 lines
264 B
Go

package main
import "fmt"
func fetch(url string) (string, *RequestError)
func niceFetch(url string) {
var s string
var e error
s, e = fetch(url)
if e != nil {
fmt.Printf("Unable to fetch URL: %v\n", e)
} else {
fmt.Printf("URL contents: %s\n", s)
}
}