Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Base = home + "/.primes/" Directory = Base + "directory.txt" LocalConfig = Config{} StartingPrime string MaxFilesize int MaxBufferSize int ShowFails bool Host string Port = "8080" Address string AssignmentPoint = "/" ReturnPoint = "/finished" HeavyAssignmentPoint = "/heavy" HeavyReturnPoint = "/heavy/finished" Id uint64 LastPrimeGenerated *big.Int Logger = log.New(os.Stdout, "", log.LstdFlags) )
Functions ¶
func EnsureUserWantsNewConfig ¶
func EnsureUserWantsNewConfig()
EnsureUserWantsNewConfig ensures user wants a new config and if so, runs the configurator
func IsConfigured ¶
func IsConfigured() bool
IsConfigured returns whether the program is configured already
func RunConfigurator ¶
func RunConfigurator()
RunConfigurator generates a program configuration according to user input
Types ¶
type Config ¶
type Config struct { Base string `json:"base"` StartingPrime string `json:"startingprime"` MaxFilesize int `json:"maxfilesize"` MaxBufferSize int `json:"maxbuffersize"` ShowFails bool `json:"showfails"` ServerIP string `json:"serverip"` }
func GetUserConfig ¶
func GetUserConfig() Config
GetUserConfig returns a Config object containing the user's configuration
Click to show internal directories.
Click to hide internal directories.