mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Make scan options optional * Add scene rescan * Add image rescan * Add gallery rescan * Add changelog
14 lines
260 B
Go
14 lines
260 B
Go
package utils
|
|
|
|
// Btoi transforms a boolean to an int. 1 for true, false otherwise
|
|
func Btoi(b bool) int {
|
|
if b {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// IsTrue returns true if the bool pointer is not nil and true.
|
|
func IsTrue(b *bool) bool {
|
|
return b != nil && *b
|
|
}
|