Source file tour/methods/exercise-errors.go

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import (
     6  	"fmt"
     7  )
     8  
     9  func Sqrt(x float64) (float64, error) {
    10  	return 0, nil
    11  }
    12  
    13  func main() {
    14  	fmt.Println(Sqrt(2))
    15  	fmt.Println(Sqrt(-2))
    16  }
    17  

View as plain text