Skip to content

.: Implement WithStack2 - #17

Merged
AlexisMontagne merged 1 commit into
am/docfrom
am/with-stack-2
Nov 24, 2025
Merged

.: Implement WithStack2#17
AlexisMontagne merged 1 commit into
am/docfrom
am/with-stack-2

Conversation

@AlexisMontagne

Copy link
Copy Markdown
Member

What does this PR do?

I am getting tired of the linter errors: error returned from interface method should be wrapped: sig: func (github.com/upfluence/xyz.MyType).MyFuction([]any) (any, error) (wrapcheck)

It ask to explicitly add some lines of codes in order in order to add to the code minimal value to the author.

A good tradeoff is to add a small function in order to inline this, similar to regexp.MustCompile.

PS: the name is drown from a parralel of iter.Seq and iter.Seq2

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Properly labeled

Additional Notes

if input < 0 {
return Result{}, fmt.Errorf("negative input not allowed")
}
return Result{Value: input * 2}, nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci]reported by reviewdog 🐶
return with no blank line before (nlreturn)

@AlexisMontagne
AlexisMontagne merged commit 49c9ffd into am/docNov 24, 2025
1 check failed
@AlexisMontagne
AlexisMontagne deleted the am/with-stack-2 branch November 24, 2025 17:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@AlexisMontagne@tgallice@Sypheos@upfluence-bot