Skip to content

Commit

Permalink
add missing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
  • Loading branch information
dragonchaser committed Feb 2, 2024
1 parent f0c6295 commit b796984
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/http/services/owncloud/ocdav/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import (

type tokenStatInfoKey struct{}

// ContextWithTokenStatInfo adds the token stat info to the context
func ContextWithTokenStatInfo(ctx context.Context, info *cs3storage.ResourceInfo) context.Context {
return context.WithValue(ctx, tokenStatInfoKey{}, info)
}

// TokenStatInfoFromContext returns the token stat info from the context
func TokenStatInfoFromContext(ctx context.Context) (*cs3storage.ResourceInfo, bool) {
v, ok := ctx.Value(tokenStatInfoKey{}).(*cs3storage.ResourceInfo)
return v, ok
Expand Down

0 comments on commit b796984

Please sign in to comment.