/*
   Indicating capability: READER

   Syntax
     NEXT

   Responses
     223 n message-id    Article found
     412                 No newsgroup selected
     420                 Current article number is invalid
     421                 No next article in this group

   Parameters
     n             Article number
     message-id    Article message-id

Moves the current article pointer to the next article.
*/
Indicating capability: READER

Syntax
NEXT

Responses
223 n message-id    Article found
412                 No newsgroup selected
420                 Current article number is invalid
421                 No next article in this group

Parameters
n             Article number
message-id    Article message-id

Moves the current article pointer to the next article.
/ * Indicating capability : READER Syntax NEXT Responses 223 n message - id Article found 412 No newsgroup selected 420 Current article number is invalid 421 No next article in this group Parameters n Article number message - id Article message - id Moves the current article pointer to the next article . * /
func handleNext(args []string, s *session, c *textproto.Conn) error {
	if s.group == nil {
		return ErrNoGroupSelected
	}
	if s.number<0 {
		s.number = s.group.Low-1
	}
	for s.number<=s.group.High {
		s.number++
		a,_ := s.backend.GetArticle(s.group,fmt.Sprint(s.number))		
		if a!=nil {
			c.PrintfLine("223 %d %s",s.number,a.MessageID())
			return nil
		}
	}
	return ErrNoNextArticle
}
func handleNext ( args [ ] string , s * session , c * textproto . Conn ) error { if s . group == nil { return ErrNoGroupSelected } if s . number < 0 { s . number = s . group . Low - 1 } for s . number <= s . group . High { s . number ++ a , _ := s . backend . GetArticle ( s . group , fmt . Sprint ( s . number ) ) if a != nil { c . PrintfLine ( " " , s . number , a . MessageID ( ) ) return nil } } return ErrNoNextArticle }
Indicating capability: READER
Indicating capability : READER