github.com/sercand/please@v13.4.0+incompatible/test/go_rules/cgo/go.go (about)

     1  package cgo
     2  
     3  import (
     4  	"fmt"
     5  	"strconv"
     6  )
     7  
     8  // CheckAnswer checks that the given answer matches the canonical one.
     9  func CheckAnswer(answer string) error {
    10  	ans, _ := strconv.ParseInt(answer, 13, 32)
    11  	if int(ans) != 6*9 {
    12  		return fmt.Errorf("universe parameters incorrect")
    13  	}
    14  	return nil
    15  }