Trim commented code
This commit is contained in:
parent
5540729b56
commit
df8e83a2b8
|
|
@ -138,47 +138,3 @@ func (padb *PolicyAuthorityDatabaseImpl) CheckRules(host string, requireWhitelis
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// func (padb *PolicyAuthorityDatabaseImpl) IsBlacklisted(host string) (bool, error) {
|
||||
// // Wrap in transaction so the blacklist doesn't change under us
|
||||
// tx, err := padb.dbMap.Begin()
|
||||
// if err != nil {
|
||||
// tx.Rollback()
|
||||
// return false, err
|
||||
// }
|
||||
//
|
||||
// var count int
|
||||
// _, err = tx.Select(
|
||||
// &count,
|
||||
// `SELECT COUNT(*) FROM ruleList WHERE :host LIKE rule AND type = 'blacklist'`,
|
||||
// map[string]interface{}{"host": host},
|
||||
// )
|
||||
// if err != nil {
|
||||
// return false, err
|
||||
// }
|
||||
//
|
||||
// err = tx.Commit()
|
||||
// return count > 0, err
|
||||
// }
|
||||
//
|
||||
// func (padb *PolicyAuthorityDatabaseImpl) IsWhitelisted(host string) (bool, error) {
|
||||
// // Wrap in transaction so the whitelist doesn't change under us
|
||||
// tx, err := padb.dbMap.Begin()
|
||||
// if err != nil {
|
||||
// tx.Rollback()
|
||||
// return false, err
|
||||
// }
|
||||
//
|
||||
// var count int
|
||||
// _, err = tx.Select(
|
||||
// &count,
|
||||
// `SELECT COUNT(*) FROM ruleList WHERE :host LIKE rule AND type = 'whitelist'`,
|
||||
// map[string]interface{}{"host": host},
|
||||
// )
|
||||
// if err != nil {
|
||||
// return false, err
|
||||
// }
|
||||
//
|
||||
// err = tx.Commit()
|
||||
// return count > 0, err
|
||||
// }
|
||||
|
|
|
|||
Loading…
Reference in New Issue