Commit af4a85c0 authored by Sander van Harmelen's avatar Sander van Harmelen

Merge pull request #49 from matm/master

labels: marshal error fix
parents ca13d83a 0b579371
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package gitlab package gitlab
import ( import (
"encoding/json"
"fmt" "fmt"
"log" "log"
"net/url" "net/url"
...@@ -81,7 +82,7 @@ type Labels []string ...@@ -81,7 +82,7 @@ type Labels []string
// MarshalJSON implements the json.Marshaler interface. // MarshalJSON implements the json.Marshaler interface.
func (l *Labels) MarshalJSON() ([]byte, error) { func (l *Labels) MarshalJSON() ([]byte, error) {
return []byte(strings.Join(*l, ",")), nil return json.Marshal(strings.Join(*l, ","))
} }
// ListIssuesOptions represents the available ListIssues() options. // ListIssuesOptions represents the available ListIssues() options.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment