Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v0.9.5
  • v0.9.4
  • v0.9.3
  • v0.9.2
  • v0.9.1
  • v0.9.0
  • v0.8.2
  • v0.8.1
  • v0.8.0
  • v0.7.2
  • v0.7.1
  • v0.7.0
  • v0.6.0
  • v0.5.3
  • v0.5.2
  • v0.5.1
  • v0.5.0
  • v0.4.0
  • v0.3.1
  • v0.3.0
21 results

pathfinder

  • Clone with SSH
  • Clone with HTTPS
  • Pathfinder

    What does this library?

    This library provides a simple way to get and set values in a nested structure.

    It supports:

    • Set values in a nested structure
    • Get values from a nested structure

    Installation

    go get gitlab.schukai.com/oss/libraries/go/utilities/pathfinder

    Note: This library uses Go Modules to manage dependencies.

    Usage

    Set values

    s := &StructA{}
    err := GetValue[*StructA](s, "my.key")

    Get values

    s := &StructA{}
    err := SetValue[*StructA](s, "my.key", "value")

    Contributing

    Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

    Versioning is done with SemVer. Changelog is generated with git-chglog

    Commit messages should follow the Conventional Commits specification. Messages are started with a type, which is one of the following:

    • feat: A new feature
    • fix: A bug fix
    • doc: Documentation only changes
    • refactor: A code change that neither fixes a bug nor adds a feature
    • perf: A code change that improves performance
    • test: Adding missing or correcting existing tests
    • chore: Other changes that don't modify src or test files

    The footer would be used for a reference to an issue or a breaking change.

    A commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in semantic versioning). A BREAKING CHANGE can be part of commits of any type.

    the following is an example of a commit message:

    feat: add 'extras' field

    License

    AGPL-3.0