Skip to content

Fix README documentation examples for obfuscator methods#34

Merged
gildas merged 2 commits intofeature/obfuscatorfrom
copilot/sub-pr-33
Feb 8, 2026
Merged

Fix README documentation examples for obfuscator methods#34
gildas merged 2 commits intofeature/obfuscatorfrom
copilot/sub-pr-33

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Addressed two issues in the obfuscator documentation examples where methods were incorrectly called on the package instead of the logger instance.

Changes:

  • Fixed logger.Obfuscate()log.Obfuscate() to call method on logger instance
  • Fixed logger.Unobfuscate()log.Unobfuscate() with proper error handling for the (string, error) return signature

Corrected example:

log := logger.Create("MYAPP", cipherBlock)

data, err := log.Unobfuscate(obfuscatedData)
if err != nil {
    fmt.Printf("failed to unobfuscate data: %v", err)
} else {
    fmt.Printf("Here is the data: %s", data)
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: gildas <56485+gildas@users.noreply.github.com>
Copilot AI changed the title [WIP] Add obfuscation capability to logger package Fix README documentation examples for obfuscator methods Feb 8, 2026
Copilot AI requested a review from gildas February 8, 2026 16:47
@gildas gildas marked this pull request as ready for review February 8, 2026 16:49
Copilot AI review requested due to automatic review settings February 8, 2026 16:49
@gildas gildas merged commit 8f9d70e into feature/obfuscator Feb 8, 2026
2 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the README’s obfuscation documentation examples so they call Obfuscate/Unobfuscate on the *logger.Logger instance (as implemented in code), and updates the Unobfuscate example to handle its (string, error) return.

Changes:

  • Updated the Obfuscate example to call log.Obfuscate(...) instead of logger.Obfuscate(...).
  • Updated the Unobfuscate example to call log.Unobfuscate(...) and handle the returned error.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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