InsertSystem inserets a system configuration
(db *DB, key, val string)
| 33 | |
| 34 | // InsertSystem inserets a system configuration |
| 35 | func InsertSystem(db *DB, key, val string) error { |
| 36 | if _, err := db.Exec("INSERT INTO system (key, value) VALUES (? , ?);", key, val); err != nil { |
| 37 | return errors.Wrap(err, "saving system config") |
| 38 | } |
| 39 | |
| 40 | return nil |
| 41 | } |
| 42 | |
| 43 | // UpsertSystem inserts or updates a system configuration |
| 44 | func UpsertSystem(db *DB, key, val string) error { |