-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lets see how well this gets jsonified * bump to 2.10.0 since we're adding json support * commenting on report type * summary report description * json output example
- Loading branch information
1 parent
6f8acd0
commit 5c6f0c6
Showing
6 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
package presenters | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
|
||
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
func (p *Presenter) asJSON() { | ||
log.Fatalln("uhhh... TODO. You probably shouldn't have used interfaces for the reporters, you should 've used structs. But it made sense at the time.") | ||
j, err := json.Marshal(p) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
|
||
// TODO maybe there's a cleaner way of outputting this than just a println | ||
fmt.Println(string(j)) | ||
} |