31}
32
33// paste return paste given id, it ignores the expiry
34func (m *Memory) paste(ctx context.Context, id uuid.UUID) (Paste, error) {35 m.mutex.RLock()
36 defer m.mutex.RUnlock()
37
23}
24
25// SavePaste stores the paste in memmory
26func (m *Memory) SavePaste(ctx context.Context, p Paste) (Paste, error) {27 m.mutex.Lock()
28 defer m.mutex.Unlock()
29 m.data[p.ID.String()] = p
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}