Skip to content

Commit

Permalink
operator: optimize builder code for the previous PRs (tikv#2947)
Browse files Browse the repository at this point in the history
Signed-off-by: Zheng Xiangsheng <hundundm@gmail.com>
  • Loading branch information
HunDunDM authored Sep 14, 2020
1 parent 830e8dc commit 801018d
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 114 deletions.
8 changes: 8 additions & 0 deletions pkg/typeutil/convension.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ func BoolToUint64(b bool) uint64 {
}
return 0
}

// BoolToInt converts bool to int.
func BoolToInt(b bool) int {
if b {
return 1
}
return 0
}
Loading

0 comments on commit 801018d

Please sign in to comment.