Skip to content

Commit

Permalink
Fix Proposal Stringer (cosmos#3986)
Browse files Browse the repository at this point in the history
Fix the `Stringer` interface implementation for the `Proposal` type:
- Add missing description.
- Fix indentation.
  • Loading branch information
alexanderbez authored and alessio committed Mar 27, 2019
1 parent 8550d14 commit f635b1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#3986 Update the Stringer implementation of the Proposal type.
21 changes: 12 additions & 9 deletions x/gov/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ type Proposal struct {
// nolint
func (p Proposal) String() string {
return fmt.Sprintf(`Proposal %d:
Title: %s
Type: %s
Status: %s
Submit Time: %s
Deposit End Time: %s
Total Deposit: %s
Voting Start Time: %s
Voting End Time: %s`, p.ProposalID, p.GetTitle(), p.ProposalType(),
Title: %s
Type: %s
Status: %s
Submit Time: %s
Deposit End Time: %s
Total Deposit: %s
Voting Start Time: %s
Voting End Time: %s
Description: %s`,
p.ProposalID, p.GetTitle(), p.ProposalType(),
p.Status, p.SubmitTime, p.DepositEndTime,
p.TotalDeposit, p.VotingStartTime, p.VotingEndTime)
p.TotalDeposit, p.VotingStartTime, p.VotingEndTime, p.GetDescription(),
)
}

// ProposalContent is an interface that has title, description, and proposaltype
Expand Down

0 comments on commit f635b1c

Please sign in to comment.