Skip to content

fix: make the documented import path work; add pointer helpers - #2

Merged
catsika merged 1 commit into
mainfrom
fix/module-root-import
Oct 17, 2026
Merged

catsika merged 1 commit into
mainfrom
fix/module-root-import

Conversation

@catsika

@catsika catsika commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Problem

The README and docs say import "github.com/keymint-dev/keymint-go", but the package lives in src/. That import fails with no required module provides package github.com/keymint-dev/keymint-go. The docs also use keymint.String(...) for HostID, which doesn't exist.

Change

  • Move the package to the module root (renames only; history preserved).
  • src/ stays as a deprecated forwarding package (type aliases + function vars), so existing .../keymint-go/src imports keep compiling.
  • Add the String, Int and Bool pointer helpers.
  • CI compiles a consumer of both import paths. The live test job now runs from the root (go test .).
  • README: upgrade note.

Testing

  • gofmt, go vet and go test ./... pass.
  • The docs quickstart snippet compiles in a separate module via replace, with the root import and with the legacy /src import.
  • The new CI step was run locally.

Release

After merge, tag v1.6.0 (additive; /src still works). The Keymint docs will switch to the root import once the tag exists.

The package lived in src/, so `import "github.com/keymint-dev/keymint-go"`
(used in the README and docs) failed with "no required module provides
package". Move the package to the module root.

- src/ keeps compiling as a deprecated forwarding package (type aliases and
  function vars) so existing .../keymint-go/src imports don't break.
- Add String, Int and Bool pointer helpers for optional fields; docs already
  call keymint.String for ActivateKeyParams.HostID.
- CI compiles a consumer of both import paths; live tests run from the root.
@catsika

catsika commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Reviewed 2026-10-17: go build, go vet and go test ./... pass. Backward compatibility verified by compiling a consumer that imports the old github.com/keymint-dev/keymint-go/src path and references all 5 functions and 49 types from the previous package, so existing /src imports keep compiling via src/compat.go.

@catsika
catsika force-pushed the fix/module-root-import branch from 58bcf00 to e33244f Compare October 17, 2026 23:42
@catsika
catsika marked this pull request as ready for review October 17, 2026 23:45
@catsika
catsika merged commit eb35c6d into main Oct 17, 2026
2 checks passed
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