Fix Proposal Stringer (#3986)

Fix the `Stringer` interface implementation for the `Proposal` type:
- Add missing description.
- Fix indentation.
This commit is contained in:
Alexander Bezobchuk 2019-03-27 17:08:20 -04:00 committed by Alessio Treglia
parent 8550d14071
commit f635b1cd14
2 changed files with 13 additions and 9 deletions

View File

@ -0,0 +1 @@
#3986 Update the Stringer implementation of the Proposal type.

View File

@ -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