Skip to content

Commit

Permalink
💡 Add comments in GetEncoders func
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Jul 1, 2020
1 parent 7b38866 commit 848afe3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/pencode/encoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (c *Chain) HasEncoder(name string) bool {
}

func (c *Chain) GetEncoders() []string {
// Sort the encoders alphabetically
names := make([]string, 0, len(availableEncoders))
for e := range availableEncoders {
names = append(names, e)
Expand All @@ -87,8 +88,6 @@ func (c *Chain) Usage() {
}
}
format := fmt.Sprintf(" %%-%ds- %%s\n", max_length+2)

// Sort the encoders alphabetically
names := c.GetEncoders()

for _, n := range names {
Expand Down

0 comments on commit 848afe3

Please sign in to comment.