aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2019-04-10 21:50:03 +0200
committerQuentin Gliech <quentingliech@gmail.com>2019-05-22 20:22:35 +0200
commit9adf6de4b5f3df44657d336ed49f9b992d50f458 (patch)
tree87355784512d4b067cd3d6c2418f40ad39c8e3b5 /bug
parentd156f41d997b4d33d3aa690796f09bbf66889bbe (diff)
downloadgit-bug-9adf6de4b5f3df44657d336ed49f9b992d50f458.tar.gz
graphql: expose label color
Diffstat (limited to 'bug')
-rw-r--r--bug/label.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/bug/label.go b/bug/label.go
index 08f122b4..0d6d4142 100644
--- a/bug/label.go
+++ b/bug/label.go
@@ -4,7 +4,6 @@ import (
"crypto/sha1"
"fmt"
"image/color"
- "io"
"strings"
"github.com/MichaelMure/git-bug/util/text"
@@ -51,23 +50,6 @@ func (l Label) RGBA() color.RGBA {
return colors[id]
}
-// UnmarshalGQL implements the graphql.Unmarshaler interface
-func (l *Label) UnmarshalGQL(v interface{}) error {
- _, ok := v.(string)
- if !ok {
- return fmt.Errorf("labels must be strings")
- }
-
- *l = v.(Label)
-
- return nil
-}
-
-// MarshalGQL implements the graphql.Marshaler interface
-func (l Label) MarshalGQL(w io.Writer) {
- _, _ = w.Write([]byte(`"` + l.String() + `"`))
-}
-
func (l Label) Validate() error {
str := string(l)