rsc.io/go@v0.0.0-20150416155037-e040fd465409/src/cmd/5g/util.go (about)

     1  // Copyright 2015 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  func bool2int(b bool) int {
     8  	if b {
     9  		return 1
    10  	}
    11  	return 0
    12  }