fix signature and add comment

pull/1881/head
Cory LaNou 2015-03-07 07:57:20 -07:00
parent 97dc11c96d
commit c52210d9a5
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ type Results struct {
Err error
}
func (r Results) MarshalJSON() ([]byte, error) {
// MarshalJSON encodes the result into JSON.
func (r *Results) MarshalJSON() ([]byte, error) {
// Define a struct that outputs "error" as a string.
var o struct {
Results []Result `json:"results,omitempty"`