示例#1
0
// Forces the session to be reloaded from disk.
func (s *Session) Load() (err os.Error) {
	filename := "data/shared/sessions/" + strconv.Itoa64(s.ID)
	fmt.Println(filename)
	s.settings, err = ini.Load(filename)
	if err != nil {
		dlog.Println("Warning: Error saving session data:", err)
		return err
	}
	return nil
}
示例#2
0
文件: user.go 项目: wcspromoteam/user
func (u *User) Load() (err os.Error) {
	filename := u.fileName()
	u.settings, err = ini.Load(filename)
	return err
}