cmd/mtredisalize/leveldb.go

This commit is contained in:
Sascha L. Teichmann
2024-01-06 16:12:19 +01:00
parent 5442fab97d
commit 7f69467f26
7 changed files with 27 additions and 24 deletions

View File

@ -44,7 +44,8 @@ func NewRedisParser(reader *bufio.Reader,
}
func (rp *RedisParser) Parse() {
for line := rp.nextLine(); line != nil && rp.dispatch(line); line = rp.nextLine() {
for line := rp.nextLine(); line != nil && rp.dispatch(line); {
line = rp.nextLine()
}
}

View File

@ -196,7 +196,7 @@ func (ss *SQLiteSession) txStmt(stmt *sql.Stmt) *sql.Stmt {
return stmt
}
func (ss *SQLiteSession) Del(hash, key []byte) (success bool, err error) {
func (ss *SQLiteSession) Del(_, key []byte) (success bool, err error) {
var pos int64
if pos, err = ss.backend.decoder(key); err != nil {
return
@ -226,7 +226,7 @@ func (ss *SQLiteSession) Del(hash, key []byte) (success bool, err error) {
return
}
func (ss *SQLiteSession) Fetch(hash, key []byte) (data []byte, err error) {
func (ss *SQLiteSession) Fetch(_, key []byte) (data []byte, err error) {
var pos int64
if pos, err = ss.backend.decoder(key); err != nil {
return
@ -248,7 +248,7 @@ func (ss *SQLiteSession) InTransaction() bool {
return ss.tx != nil
}
func (ss *SQLiteSession) Store(hash, key, value []byte) (exists bool, err error) {
func (ss *SQLiteSession) Store(_, key, value []byte) (exists bool, err error) {
var pos int64
if pos, err = ss.backend.decoder(key); err != nil {
return
@ -322,7 +322,7 @@ func (ss *SQLiteSession) CommitTransaction() error {
}
func (ss *SQLiteSession) AllKeys(
hash []byte,
_ []byte,
done <-chan struct{}) (<-chan []byte, int, error) {
globalLock.RLock()
@ -373,7 +373,7 @@ func (ss *SQLiteSession) AllKeys(
}
func (ss *SQLiteSession) SpatialQuery(
hash, first, second []byte,
_, first, second []byte,
done <-chan struct{}) (<-chan Block, error) {
if ss.backend.interleaved {

View File

@ -177,7 +177,7 @@ func (ps *players) initConnection(wsf *websocketForwarder, c *connection) {
wsf.singleSend(c, &plsMsg{Pls: ps.current()})
}
func (ps *players) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
func (ps *players) ServeHTTP(rw http.ResponseWriter, _ *http.Request) {
rw.Header().Set("Content-Type", "application/json")
pls := ps.current()
encoder := json.NewEncoder(rw)