add(util.go): util method SecretBytesFromString #31

Merged
decentral1se merged 1 commits from util-package into main 2026-11-09 14:12:07 +00:00
Collaborator

util.SecretBytesFromString is intended to be used together with setting the secret key when constructing an endpoint

for context: #30 (comment)

  • ai bad, no ai here

example:

endpoint, err := endpoint.New(
        endpoint.WithAlpns(alpn),
        endpoint.WithApplyN0(),
        endpoint.WithDebug(),
        endpoint.WithSecretKey(util.SecretBytesFromString("hello-secret-bytes")),
    )   
`util.SecretBytesFromString` is intended to be used together with setting the secret key when constructing an endpoint for context: https://git.coopcloud.tech/decentral1se/iroh-go/pulls/30#issuecomment-46205 - [x] ai bad, no ai here example: ```golang endpoint, err := endpoint.New( endpoint.WithAlpns(alpn), endpoint.WithApplyN0(), endpoint.WithDebug(), endpoint.WithSecretKey(util.SecretBytesFromString("hello-secret-bytes")), ) ```
cblgh added 1 commit 2026-11-09 14:08:15 +00:00
add(util.go): util method SecretBytesFromString
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
c9101804ac
intended to be used together with setting the secret key when
constructing an endpoint
decentral1se left a comment
Owner

Radical. I'm starting to write a few unit tests, so I'll swoop in beside util.go to write a little test based on your PR docs.

🎆🎆🎆

Radical. I'm starting to write a few unit tests, so I'll swoop in beside `util.go` to write a little test based on your PR docs. 🎆🎆🎆
decentral1se merged commit eaa85d42e7 into main 2026-11-09 14:12:07 +00:00
cblgh deleted branch util-package 2026-11-09 14:13:57 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: decentral1se/iroh-go#31