Changeset 652 in code for trunk/server.go


Ignore:
Timestamp:
Oct 18, 2021, 5:15:15 PM (4 years ago)
Author:
contact
Message:

Add context args to Database interface

This is a mecanical change, which just lifts up the context.TODO()
calls from inside the DB implementations to the callers.

Future work involves properly wiring up the contexts when it makes
sense.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server.go

    r636 r652  
    22
    33import (
     4        "context"
    45        "fmt"
    56        "log"
     
    8687
    8788func (s *Server) Start() error {
    88         users, err := s.db.ListUsers()
     89        users, err := s.db.ListUsers(context.TODO())
    8990        if err != nil {
    9091                return err
     
    127128        }
    128129
    129         err := s.db.StoreUser(user)
     130        err := s.db.StoreUser(context.TODO(), user)
    130131        if err != nil {
    131132                return nil, fmt.Errorf("could not create user in db: %v", err)
Note: See TracChangeset for help on using the changeset viewer.