Skip to main content

boolToInt.go

boolToInt.go - Overview

This file provides a utility function to convert a boolean value to an integer.

Detailed Documentation

Function: BoolToInt

Purpose: Converts a boolean value to its integer representation (1 for true, 0 for false).

Parameters:

  • b (bool): The boolean value to convert.

Returns:

  • int: 1 if b is true, 0 if b is false.

Getting Started Relevance: NO