From 331597b9f8a7942cbcb233a328301e4d5bf94fb0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 11 Jan 2019 23:28:47 +0200 Subject: Switch to Go modules and make other changes --- .../github.com/lucasb-eyer/go-colorful/hexcolor.go | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go (limited to 'vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go') diff --git a/vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go b/vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go deleted file mode 100644 index 86a5ed9..0000000 --- a/vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go +++ /dev/null @@ -1,37 +0,0 @@ -package colorful - -import ( - "database/sql/driver" - "fmt" - "reflect" -) - -// A HexColor is a Color stored as a hex string "#rrggbb". It implements the -// database/sql.Scanner and database/sql/driver.Value interfaces. -type HexColor Color - -type errUnsupportedType struct { - got interface{} - want reflect.Type -} - -func (hc *HexColor) Scan(value interface{}) error { - s, ok := value.(string) - if !ok { - return errUnsupportedType{got: reflect.TypeOf(value), want: reflect.TypeOf("")} - } - c, err := Hex(s) - if err != nil { - return err - } - *hc = HexColor(c) - return nil -} - -func (hc *HexColor) Value() (driver.Value, error) { - return Color(*hc).Hex(), nil -} - -func (e errUnsupportedType) Error() string { - return fmt.Sprintf("unsupported type: got %v, want a %s", e.got, e.want) -} -- cgit v1.2.3