mirror of
https://github.com/safing/portbase
synced 2025-04-12 13:39:09 +00:00
Add method to reset key of record
This commit is contained in:
parent
3dffea1d37
commit
1f08d4f02f
1 changed files with 7 additions and 0 deletions
|
@ -44,6 +44,13 @@ func (b *Base) SetKey(key string) {
|
|||
}
|
||||
}
|
||||
|
||||
// ResetKey resets the database name and key.
|
||||
// Use with caution!
|
||||
func (b *Base) ResetKey() {
|
||||
b.dbName = ""
|
||||
b.dbKey = ""
|
||||
}
|
||||
|
||||
// Key returns the key of the database record.
|
||||
// As the key must be set before any usage and can only be set once, this
|
||||
// function may be used without locking the record.
|
||||
|
|
Loading…
Add table
Reference in a new issue