Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToUpperCaseFirst ¶
ToUpperCaseFirst takes a string and Uppercases the first Letter
Types ¶
type User ¶
type User struct {
Language string
}
User holds the settings for the user of Rosetta
func (*User) DeleteSettings ¶
func (u *User) DeleteSettings()
DeleteSettings removes the settings.gob file @ERROR error: prints the error and returns
func (*User) ReadSettings ¶
ReadSettings reads the 'settings.gob' file from disk Decoding with encoding/gob from the std lib Decodes the bytes back to an User struct @RETURNS user: The User struct with user settings
func (*User) WriteSettings ¶
func (u *User) WriteSettings()
WriteSettings write's the user object to Disk Writesettings create's a settings.gob when it is not there The method uses the encoding/gob from the std lib encode the User struct The user struct is then written and persisted to disk @ERROR error: exits the program when writing of the settings is not possible