Change "x := int64(0)" statements to "var x int64"

This commit is contained in:
Keith Rutkowski 2018-07-06 08:48:21 -04:00
parent da4bba50ef
commit 820a995d13

View File

@ -235,7 +235,7 @@ func (c *Comment) EventTag() string {
// LoadReference if comment.Type is CommentType{Issue,Commit,Comment,Pull}Ref, then load RefIssue, RefComment // LoadReference if comment.Type is CommentType{Issue,Commit,Comment,Pull}Ref, then load RefIssue, RefComment
func (c *Comment) LoadReference() error { func (c *Comment) LoadReference() error {
if c.Type == CommentTypeIssueRef || c.Type == CommentTypePullRef { if c.Type == CommentTypeIssueRef || c.Type == CommentTypePullRef {
issueID := int64(0) var issueID int64
n, err := fmt.Sscanf(c.Content, "%d", &issueID) n, err := fmt.Sscanf(c.Content, "%d", &issueID)
if err != nil { if err != nil {
return err return err
@ -271,7 +271,7 @@ func (c *Comment) LoadReference() error {
// this is a new style commit ref // this is a new style commit ref
contentParts := strings.SplitN(c.Content, " ", 2) contentParts := strings.SplitN(c.Content, " ", 2)
if len(contentParts) == 2 { if len(contentParts) == 2 {
repoID := int64(0) var repoID int64
n, err := fmt.Sscanf(contentParts[0], "%d", &repoID) n, err := fmt.Sscanf(contentParts[0], "%d", &repoID)
if err != nil { if err != nil {
return err return err
@ -300,7 +300,7 @@ func (c *Comment) LoadReference() error {
} }
} }
} else if c.Type == CommentTypeCommentRef { } else if c.Type == CommentTypeCommentRef {
commentID := int64(0) var commentID int64
n, err := fmt.Sscanf(c.Content, "%d", &commentID) n, err := fmt.Sscanf(c.Content, "%d", &commentID)
if err != nil { if err != nil {
return err return err