From 30ab6f9228d85e4897473cc1ecd07ea48232a0bb Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Sat, 8 May 2021 22:42:13 +0200 Subject: [PATCH] Fix gopls issues --- internal/db/paste.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/db/paste.go b/internal/db/paste.go index 91e3882..c6cc6a2 100644 --- a/internal/db/paste.go +++ b/internal/db/paste.go @@ -2,14 +2,12 @@ package db import ( "crypto/rand" - "encoding/base64" "encoding/hex" "net/http" "net/url" "strings" "time" - gobmarsh "gitea.hashru.nl/dsprenkels/rushlink/pkg/gobmarsh" "github.com/google/uuid" "github.com/pkg/errors" "gorm.io/gorm" @@ -84,7 +82,6 @@ func ErrHTTPStatusCode(err error) int { // Base64 encoding and decoding var base64Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" -var base64Encoder = base64.RawURLEncoding.WithPadding(base64.NoPadding) func (t PasteType) String() string { switch t { @@ -158,12 +155,6 @@ func GetPasteNoValidate(db *gorm.DB, key string) (*Paste, error) { return &ps[0], nil } -func decodePaste(storedBytes []byte) (*Paste, error) { - p := &Paste{} - err := gobmarsh.Unmarshal(storedBytes, p) - return p, err -} - // Save saves this Paste to the database. func (p *Paste) Save(db *gorm.DB) error { return db.Save(p).Error