config

package
v0.0.0-...-6e6967c Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TotalPopulation uint64

	Gender struct {
		Male   float64
		Female float64
	}
	Elderly struct {
		Child float64
		Teen  float64
		Elder float64
	}

	// Path of csv files
	FemaleNameFile string
	MaleNameFile   string
	LastnameFile   string

	// Path of the output file
	OutputFile *os.File
}

Config struct holds the ratios of the different types of blocks.

func NewConfig

func NewConfig(population uint64, femaleNameCSVFile, maleNameCSVFile, lastnameCSVFile string, outputFile *os.File) (Config, error)

NewConfig creates a new config.

func (Config) IsValid

func (c Config) IsValid() (map[string]string, bool)

IsValid checks validation of the Config struct.

Jump to

Keyboard shortcuts

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