github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2015/go-for-java-programmers/func.go (about)

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import "fmt"
     6  
     7  // div divides n by d and returns the quotient and remainder.
     8  func div(n, d int) (q, r int) { // HL
     9  	return n / d, n % d
    10  }
    11  
    12  func main() {
    13  	quot, rem := div(4, 3)
    14  	fmt.Println(quot, rem)
    15  }