mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 04:22:22 +00:00
19 lines
441 B
Go
19 lines
441 B
Go
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
|
|
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
|
|
// +build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
. "."
|
|
)
|
|
|
|
func main() {
|
|
println("If(true, 1, 2) =", If(true, 1, 2))
|
|
println("If(false, 1, 2) =", If(false, 1, 2))
|
|
println("AsmIf(true, 1, 2) =", AsmIf(true, 1, 2))
|
|
println("AsmIf(false, 1, 2) =", AsmIf(false, 1, 2))
|
|
println("AsmIf(false, 2, 1) =", AsmIf(false, 2, 1))
|
|
}
|