cleanup bool usage
This commit is contained in:
parent
15bb58980a
commit
66aa82f8a8
4 changed files with 6 additions and 6 deletions
|
|
@ -52,7 +52,7 @@ func db_insert_card(one_time_code string, k0_auth_key string, k2_cmac_key string
|
|||
|
||||
enable_flag_yn := "N"
|
||||
|
||||
if enable_flag == true {
|
||||
if enable_flag {
|
||||
enable_flag_yn = "Y"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func main() {
|
|||
|
||||
// handle -help
|
||||
|
||||
if *help_flag_ptr == true {
|
||||
if *help_flag_ptr {
|
||||
flag.PrintDefaults()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ func lnurlw_callback(w http.ResponseWriter, req *http.Request) {
|
|||
write_error(w)
|
||||
return
|
||||
}
|
||||
if lnurlw_timeout == true {
|
||||
if lnurlw_timeout {
|
||||
log.WithFields(log.Fields{"card_payment_id": p.card_payment_id}).Info("lnurlw request has timed out")
|
||||
write_error(w)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ func setup_card_record(uid string, ctr uint32, uid_bin []byte, ctr_bin []byte, c
|
|||
return err
|
||||
}
|
||||
|
||||
if cmac_valid == true {
|
||||
if cmac_valid {
|
||||
log.WithFields(log.Fields{
|
||||
"i": i,
|
||||
"card.card_id": card.card_id,
|
||||
|
|
@ -223,7 +223,7 @@ func parse_request(req *http.Request) (int, error) {
|
|||
return 0, err
|
||||
}
|
||||
|
||||
if cmac_valid == false {
|
||||
if !cmac_valid {
|
||||
return 0, errors.New("cmac incorrect")
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ func parse_request(req *http.Request) (int, error) {
|
|||
return 0, err
|
||||
}
|
||||
|
||||
if counter_ok == false {
|
||||
if !counter_ok {
|
||||
return 0, errors.New("counter not increasing")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue