github.com/keysonzzz/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgRpc/tplTestPackage/server.go (about)

     1  package tplTestPackage
     2  
     3  import (
     4  	"errors"
     5  )
     6  
     7  type Demo struct {
     8  }
     9  
    10  func (s *Demo) PostScoreInt(LbId string, Score int) (Info string, err error) {
    11  	if Score == 1 {
    12  		return LbId, nil
    13  	} else {
    14  		return "", errors.New("Score!=1")
    15  	}
    16  }