cfg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	WriteString(s string) (n int, err error)
	Name() string
	Read(p []byte) (n int, err error)
	Write(p []byte) (n int, err error)
	Close() error
}

File defines the interface for file operations.

type Generator

type Generator interface {
	// GenerateConfigPackage generates '<packagename>/config.go'
	// and '<packagename>/config_test.go' using a provided sample .env file.
	GenerateConfigPackage() ([]string, error)
	// GenerateConfigPackage generates 'config' package with '<packagename>/config.go'
	// and '<packagename>/config_test.go' using a provided .env file.
	GenerateConfigPackageFromEnvFile(envFilePath string) ([]string, error)
}

Generator is an interface for generating configuration files.

func NewGenerator

func NewGenerator(packageName string) Generator

NewGenerator creates a new instance of Generator.

Jump to

Keyboard shortcuts

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