Skip to content

Commit

Permalink
dhcpsvc: imp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Jul 9, 2024
1 parent 083da36 commit 0532241
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/dhcpsvc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ func New(ctx context.Context, conf *Config) (srv *DHCPServer, err error) {
// Don't wrap the error since it's informative enough as is.
return nil, err
}
// TODO(e.burkov): Migrate.

return srv, nil
}
Expand Down Expand Up @@ -216,7 +215,7 @@ func (srv *DHCPServer) AddLease(ctx context.Context, l *Lease) (err error) {
addr := l.IP
iface, err := srv.ifaceForAddr(addr)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand All @@ -231,7 +230,7 @@ func (srv *DHCPServer) AddLease(ctx context.Context, l *Lease) (err error) {

err = srv.dbStore(ctx)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand All @@ -255,7 +254,7 @@ func (srv *DHCPServer) UpdateStaticLease(ctx context.Context, l *Lease) (err err
addr := l.IP
iface, err := srv.ifaceForAddr(addr)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand All @@ -270,7 +269,7 @@ func (srv *DHCPServer) UpdateStaticLease(ctx context.Context, l *Lease) (err err

err = srv.dbStore(ctx)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand All @@ -292,7 +291,7 @@ func (srv *DHCPServer) RemoveLease(ctx context.Context, l *Lease) (err error) {
addr := l.IP
iface, err := srv.ifaceForAddr(addr)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand All @@ -307,7 +306,7 @@ func (srv *DHCPServer) RemoveLease(ctx context.Context, l *Lease) (err error) {

err = srv.dbStore(ctx)
if err != nil {
// Don't wrap the error since there is already an annotation deferred.
// Don't wrap the error since it's already informative enough as is.
return err
}

Expand Down

0 comments on commit 0532241

Please sign in to comment.