I'm looking for a library that can parse through a string and pickup parameters and add it to a golang object

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • kong

    Kong is a command-line parser for Go (by alecthomas)

  • cobra

    A Commander for modern Go CLI interactions

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • participle

    A parser library for Go

  • Like the other commenters said, it's probably best to just split the string and go through it manually. If you need a real parser, check out: https://github.com/alecthomas/participle

  • peggo

    Peggo is a Go implementation of the Peggy Orchestrator for the Injective Chain (by InjectiveLabs)

  • Sounds like you’re looking for a parsing expression generator if the number of params is unknown: https://github.com/InjectiveLabs/peggo

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts