This commit is contained in:
Anatoly Prohacky 2023-03-04 16:39:32 +10:00
parent 172b2b785c
commit 96c0cdabbf

View File

@ -70,6 +70,16 @@ func (a AclBit) String() string {
return strconv.FormatInt(int64(a), 2) return strconv.FormatInt(int64(a), 2)
} }
// converting string bits to int64
func (a AclBit) Int64() int64 {
i64, err := strconv.ParseInt(a.String(), 2, 64)
if err != nil {
return -1
}
return i64
}
// converting string bits to int64 // converting string bits to int64
func Int64(i any) int64 { func Int64(i any) int64 {
var i64 int64 var i64 int64