func()

in cmd/utils/auth.go [107:117]


func (t *tokenCache) Replace(ctx context.Context, cache cache.Unmarshaler, hints cache.ReplaceHints) error {
	data, err := os.ReadFile(t.file)
	if err != nil && !errors.Is(err, fs.ErrNotExist) {
		return fmt.Errorf("reading token cache: %w", err)
	}
	err = cache.Unmarshal(data)
	if err != nil {
		return fmt.Errorf("unmarshaling token cache: %w", err)
	}
	return nil
}