Skip to content

Instantly share code, notes, and snippets.

@tebeka
Created January 11, 2022 14:29
Show Gist options
  • Save tebeka/c590344861999b6df6bf1935a0697437 to your computer and use it in GitHub Desktop.
Save tebeka/c590344861999b6df6bf1935a0697437 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
type Error int
// Error implements the built-in error interface
func (e *Error) Error() string {
return fmt.Sprintf("<Error %d>", *e)
}
func Dial(uri string) error {
var e *Error
// TODO
return e
}
func main() {
if err := Dial("ifps://caffebabe/data.json"); err != nil {
fmt.Println("ERROR:", err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment