Feature Request: function to detect a valid Token

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
backend

Research direction

Start by reviewing httpsfv's existing token parsing and serialization entry points. Add a public way to determine whether a Go string is a valid RFC token, and verify that valid and invalid token strings are distinguished consistently with the library's existing behavior.

Written by the indexing model from the issue text.

Description

I have a case where the RFC I'm implementing defines a value as "either a String or a Token". I suppose I could always use String, but it would be nice to have a function in httpsfv to tell me whether a Go string is a valid Token so that I could cast it accordingly.

Dominant language
Go
Stars
75
Forks
11
Avg merge
7d 11h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.