Files
codeql/go/ql/src/RedundantCode/ImpossibleInterfaceNilCheck.go
2022-05-20 10:07:19 -07: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)
}
}