config

package
v0.0.0-...-bd26d79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package config deals with loading and parsing configuration from disk

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is a struct to configure the validator and rules

func NewConfigFromFile

func NewConfigFromFile(path string) (*Config, error)

NewConfigFromFile returns a config struct that is filled with the values from the passed in ini file

func (*Config) GetConfigValue

func (c *Config) GetConfigValue(keyName string) (value string, err error)

GetConfigValue returns a configuration value from the config file from the default section. The way the configuration structure works for now is that sections are mostly for rules and values for checkmake itself are in the default section. That's why we just return values from the default section here.

func (*Config) GetRuleConfig

func (c *Config) GetRuleConfig(rule string) (ret rules.RuleConfig)

GetRuleConfig returns a rules.RuleConfig for the given rule. A rule corresponds to a section in the config ini file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL