gonfig | a config parser for GO | JSON Processing library

 by   creamdog Go Version: Current License: Apache-2.0

kandi X-RAY | gonfig Summary

kandi X-RAY | gonfig Summary

gonfig is a Go library typically used in Utilities, JSON Processing, Nodejs applications. gonfig has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

a config parser for GO with support for path selectors. a loaded config gonfig.FromJson("path/to/config.json") exposes the following methods.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gonfig has a low active ecosystem.
              It has 22 star(s) with 7 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of gonfig is current.

            kandi-Quality Quality

              gonfig has no bugs reported.

            kandi-Security Security

              gonfig has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              gonfig is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              gonfig releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed gonfig and discovered the below as its top functions. This is intended to give you an instant insight into gonfig implemented functionality, and help decide if they suit your requirements.
            • Get value by key
            • FromYml creates a Gonfig from a io . Reader
            • FromJson creates a Gonfig from a reader
            Get all kandi verified functions for this library.

            gonfig Key Features

            No Key Features are available at this moment for gonfig.

            gonfig Examples and Code Snippets

            No Code Snippets are available at this moment for gonfig.

            Community Discussions

            QUESTION

            Wrong struct returned from separate package function
            Asked 2020-Feb-26 at 08:55

            I develop application on my Ubuntu 18.04 with go.

            I have config package. The idea is to use this package in another packages to get configurations. Package config has struct variable _Config. The idea that function GetConfig will return _Config, and when _Config not filled the function will firstly fill _Config from json file.

            The config package looks like this:

            ...

            ANSWER

            Answered 2020-Feb-26 at 08:55

            You have a line in GetConfig() function - _Config := Config{}.

            Here, you are declaring a new variable _Config in local scope and shadowing the global variable. Remove this line and try again. Due to shadowing, global variable is not populated with config from json.

            Source https://stackoverflow.com/questions/60409895

            QUESTION

            How to pass struct type to module functions?
            Asked 2019-Aug-25 at 12:49

            I just play a little with Go to learn the handling.

            I have a main go program. I created a sub-folder for a database module, in that I want to do database operations.

            For the parameters I have a struct type with credentials etc. How can I pass the struct to the module?

            I want all of the configuration and global variables needed in an configuration struct and pass it to the modules if needed.

            Is this a good method to achieve the goal? Thanks for the help.

            ./main.go:

            ...

            ANSWER

            Answered 2019-Aug-25 at 12:49

            AppConfig on your Test function of type Configuration struct, which you have declared on your main package. Since go doesn't support cyclic dependencies, you can not import Configuration struct into the dbapi package to use it there. So, I would move Configuration struct from the main package and declare it in the dbapi package.

            Source https://stackoverflow.com/questions/57645059

            QUESTION

            loading config file when running a go application with intellij
            Asked 2018-Oct-03 at 14:22

            I use MacOS Mojave with IntelliJ Ultimate 2018.2.

            I wrote a go application that loads a config file from the directory of my project. I created an InitConfig() function to load the JSON file into a struct. this is thee code of my Config.go file

            ...

            ANSWER

            Answered 2018-Oct-03 at 14:22

            it seems that the solution is simple. all I needed is to set the "Output Directory" of my run/debug configuration to my project's directory. and then intellij executes the file in that same directory and it can find /config/config.json.

            Source https://stackoverflow.com/questions/52628316

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gonfig

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/creamdog/gonfig.git

          • CLI

            gh repo clone creamdog/gonfig

          • sshUrl

            git@github.com:creamdog/gonfig.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JSON Processing Libraries

            json

            by nlohmann

            fastjson

            by alibaba

            jq

            by stedolan

            gson

            by google

            normalizr

            by paularmstrong

            Try Top Libraries by creamdog

            JurassicCoffee

            by creamdogC#

            Nancy.Elmah

            by creamdogC#

            Node.Ogre

            by creamdogJavaScript

            Specflow.Examples

            by creamdogC#