Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bonzai.Persistence interface #276

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rwxrob
Copy link
Owner

@rwxrob rwxrob commented Nov 21, 2024

This PR adds the notion of variable persistence back to the bonzai core package by way of interfaces. This allows Cmd instances to use the Var.Persist hints in Get/Set to do the persistence without invoking an external dependency if the package global bonzai.Persistence is assigned.

  • Add bonzai.Persister
  • Add bonzai.Persistence
  • Call from Cmd.Get
  • Call from Cmd.Set
  • Conditionally call Persistence.Init
  • Refactor vars package and var command

@rwxrob rwxrob linked an issue Nov 21, 2024 that may be closed by this pull request
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.

Add bonzai.Persistence and Persister with CmdCompletion
1 participant