Skip to content

Use go 1.25.#516

Open
jholdstock wants to merge 5 commits into
decred:masterfrom
jholdstock:CSRF
Open

Use go 1.25.#516
jholdstock wants to merge 5 commits into
decred:masterfrom
jholdstock:CSRF

Conversation

@jholdstock
Copy link
Copy Markdown
Member

Taking advantage of a few features added in go 1.25, details in individual commits.

As documented in the sync package, using WaitGroup.Go is now recommended
over using .Add and .Done.
CSRF was not previously implemented in vspd because it would have
required a bit of bodging:

- Imported from gorilla/csrf with some kind of adapter to make it work
  for gin.
- Imported from a gin specific package (eg. utrack/gin-csrf) which would
  pull in a bunch of new dependencies.
- Implemented from scratch.

None of the actions in the vspd API were sensitive enough to be worth
this extra cruft, however this PR uses the implementation of CSRF
protection which was added to stdlib in go 1.25, meaning it is free
of the above compromises.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants