Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

feat: use PublishOptions for publishing IPNS records #35

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Dec 7, 2022

Requires ipfs/interface-go-ipfs-core#94:

  • Reviewed & merged
  • Dependency updated here

This PR allows us to fix --ttl flag during IPNS record publishing.
See ipfs/kubo#9471

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Merging, so we can bubble up to ipfs/kubo#9471

@lidel lidel merged commit 3f6313c into master Jan 24, 2023
@lidel lidel deleted the feat/publish-options branch January 24, 2023 23:34
Comment on lines +292 to +297
// This is a bit hacky. We do this because the EOL is based on the current
// time, but also needed in the end of the function. Therefore, we parse
// the options immediately and add an option PublishWithEOL with the EOL
// calculated in this moment.
publishOpts := opts.ProcessPublishOptions(options)
options = append(options, opts.PublishWithEOL(publishOpts.EOL))
Copy link
Member

@lidel lidel Jan 24, 2023

Choose a reason for hiding this comment

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

💭 I think this is still way better than the old context hackery, and quite futrure-proof (allows us to add more opts if needed, without having to change public API)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants