Skip to content

Use KindKeyCredentialBase constant for source kind (#21)#22

Merged
p0dalirius merged 1 commit into
mainfrom
bugfix-use-source-kind-constant
Jun 22, 2026
Merged

Use KindKeyCredentialBase constant for source kind (#21)#22
p0dalirius merged 1 commit into
mainfrom
bugfix-use-source-kind-constant

Conversation

@p0dalirius

Copy link
Copy Markdown
Contributor

Linked Issue

Closes #21

Note

Maintainability/consistency cleanup, not a behavioral bug — included at the maintainer's explicit request. Output is byte-for-byte unchanged.

Root Cause

The source kind was declared twice: as the KindKeyCredentialBase constant in kinds.go and again as a string literal "KeyCredentialBase" passed to gopengraph.NewOpenGraph in main.go. The constant was never referenced, so it was dead code and the two declarations could drift apart over time.

Fix Description

Pass KindKeyCredentialBase to NewOpenGraph so the source kind has a single authoritative definition. Value is identical to the previous literal, so the generated graph is unchanged.

How Verified

Static: KindKeyCredentialBase == "KeyCredentialBase" (kinds.go:4), so the argument to NewOpenGraph is unchanged at runtime. go build ./... and go vet ./... pass.

Test Coverage

None: no behavioral change to test; the substitution is a compile-time constant equal to the prior literal.

Scope of Change

  • Files changed: main.go
  • Submodule pointer updated: no
  • Behavioral changes outside the bug fix: none

@p0dalirius
p0dalirius merged commit b57330f into main Jun 22, 2026
8 checks passed
@p0dalirius
p0dalirius deleted the bugfix-use-source-kind-constant branch June 22, 2026 07:32
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.

main.go hardcodes source kind literal instead of using KindKeyCredentialBase constant

1 participant