func()

in dubbogo/multi/server/app/student.go [243:256]


func (s *StudentProvider) UpdateStudentByName(ctx context.Context, name string, student *Student) (bool, error) {
	outLn("Req UpdateStudentByName data:%#v", student)
	r, ok := studentCache.GetByName(name)
	if !ok {
		return false, errors.New("not found")
	}
	if len(student.ID) != 0 {
		r.ID = student.ID
	}
	if student.Age >= 0 {
		r.Age = student.Age
	}
	return true, nil
}