Skip to content

Let GitHub name the license, show the error examples on pkg.go.dev - #11

Merged
pscheid92 merged 1 commit into
mainfrom
fix-license-and-examples
Nov 9, 2026
Merged

pscheid92 merged 1 commit into
mainfrom
fix-license-and-examples

Conversation

@pscheid92

@pscheid92 pscheid92 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Two things a first-time visitor sees wrongly today.

The license shows as "Other"

LICENSE held the Go authors' notice below the BSD 3-Clause text, so GitHub matched the file to no known
license and its API reports NOASSERTION. Scorecard's License check sits at 9 for the same reason.

  • LICENSE now holds the BSD 3-Clause text alone.
  • The Go authors' notice moved, unchanged, into NOTICE.
  • The headers of decimal.go, digits.go and iso8601.go and the README point to NOTICE.

pkg.go.dev already detected BSD-3-Clause and is not affected.

Two examples are missing on pkg.go.dev

ExampleErrInvalidDuration and ExampleErrWrongType were named after variables. go/doc attaches examples
only to the package, functions, types and methods, so pkg.go.dev showed 13 of the 15 examples and left out
the two about handling errors.

They are package examples now, Example_invalidDuration and Example_wrongType. Listing the examples
through go/doc shows 15 of 15 on this branch.

Checks

just check passes. On this branch, GitHub's license API reports BSD-3-Clause for LICENSE; on main it
reports NOASSERTION.

GitHub showed the license as "Other": LICENSE held the Go authors' notice below the BSD 3-Clause text,
so the file matched no known license. The notice now has its own file, NOTICE, and LICENSE holds the
BSD 3-Clause text alone.

ExampleErrInvalidDuration and ExampleErrWrongType were named after variables, and go/doc attaches examples
only to the package, functions, types and methods. pkg.go.dev therefore showed 13 of the 15 examples.
They are package examples now: Example_invalidDuration and Example_wrongType.
@pscheid92
pscheid92 merged commit 430f799 into main Nov 9, 2026
19 checks passed
@pscheid92
pscheid92 deleted the fix-license-and-examples branch November 9, 2026 22:35
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.

1 participant