func (u *UserInfoLDAPSource) ChangeDescription(groupname string, managegroup string) error {
	conn, err := u.getTargetLDAPConnection()
	if err != nil {
		log.Println(err)
		return err
	}
	defer conn.Close()
	entry, err := u.getGroupDN(conn, groupname)
	if err != nil {
		log.Println(err)
		return err
	}
	var attributeValue string
	switch strings.ToLower(u.GroupManageAttribute) {
	case "owner":
		managerDN, err := u.getGroupDN(conn, managegroup)
		if err != nil {
			log.Println(err)
			return err
		}
		attributeValue = managerDN
	default:
		attributeValue = managegroup
	}
	modify := ldap.NewModifyRequest(entry)
	modify.Replace(u.GroupManageAttribute, []string{attributeValue})
	err = conn.Modify(modify)
	if err != nil {
		log.Println(err)
		return err
	}
	return nil
}
//Change group description --required
Change group description --required
// Change group description -- required
func (u *UserInfoLDAPSource) ChangeDescription(groupname string, managegroup string) error {
	conn, err := u.getTargetLDAPConnection()
	if err != nil {
		log.Println(err)
		return err
	}
	defer conn.Close()
	entry, err := u.getGroupDN(conn, groupname)
	if err != nil {
		log.Println(err)
		return err
	}
	var attributeValue string
	switch strings.ToLower(u.GroupManageAttribute) {
	case "owner":
		managerDN, err := u.getGroupDN(conn, managegroup)
		if err != nil {
			log.Println(err)
			return err
		}
		attributeValue = managerDN
	default:
		attributeValue = managegroup
	}
	modify := ldap.NewModifyRequest(entry)
	modify.Replace(u.GroupManageAttribute, []string{attributeValue})
	err = conn.Modify(modify)
	if err != nil {
		log.Println(err)
		return err
	}
	return nil
}
func ( u * UserInfoLDAPSource ) ChangeDescription ( groupname string , managegroup string ) error { conn , err := u . getTargetLDAPConnection ( ) if err != nil { log . Println ( err ) return err } defer conn . Close ( ) entry , err := u . getGroupDN ( conn , groupname ) if err != nil { log . Println ( err ) return err } var attributeValue string switch strings . ToLower ( u . GroupManageAttribute ) { case " " : managerDN , err := u . getGroupDN ( conn , managegroup ) if err != nil { log . Println ( err ) return err } attributeValue = managerDN default : attributeValue = managegroup } modify := ldap . NewModifyRequest ( entry ) modify . Replace ( u . GroupManageAttribute , [ ] string { attributeValue } ) err = conn . Modify ( modify ) if err != nil { log . Println ( err ) return err } return nil }
Change group description --required
Change group description -- required