config

package
v0.0.0-...-f6d2827 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

The config package holds configuration-related operations and structures

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		IP   string // IP address for the server
		Port int    // Listening port for the server
	}
	Log struct {
		Directory string // Directory path where logs will be stored
	}
	Blacklist struct {
		Keywords []string // List of blacklisted words
	}
}

Config is a struct that hold the configuration settings.

func LoadConfig

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

LoadConfig reads a TOML file located at 'path' and decodes it into a Config object. It returns the pointer to the created Config structure if successful; otherwise, it returns an error.

Jump to

Keyboard shortcuts

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