Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Comments

Add formatters#13

Closed
keyneston wants to merge 2 commits intomitchellh:masterfrom
keyneston:add_formatters
Closed

Add formatters#13
keyneston wants to merge 2 commits intomitchellh:masterfrom
keyneston:add_formatters

Conversation

@keyneston
Copy link

I'm not really happy with the code duplication.

I thought about instead of making Uif an interface making it an wrapper around a Ui that exposes the Ui interface in addition to the formatter functions.

For example:

type Uif struct {
    Ui
}

func (u *Uif) Outputf(format string, v ...interface{}) {
     u.Output(fmt.Sprintf(format, v...))
}

Etc.

If that makes sense to you then I'm happy to re-visit the code. If you prefer the interface approach go ahead and merge this as is.

Please let me know if you have any change requests.

Tarrant added 2 commits December 10, 2014 23:03
Go vet complained about us having insufficient arguments to t.Fatalf.
This appears to be correct.
@keyneston
Copy link
Author

This would fix #12

@marco-m
Copy link

marco-m commented Jun 29, 2019

@keyneston what is the status of this PR?

@keyneston keyneston closed this Jun 29, 2019
@keyneston keyneston deleted the add_formatters branch June 29, 2019 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants