(color string)
| 123 | } |
| 124 | |
| 125 | func validateHexColor(color string) error { |
| 126 | if len(color) != 7 { |
| 127 | return xerrors.New("expected # prefix and 6 characters") |
| 128 | } |
| 129 | if color[0] != '#' { |
| 130 | return xerrors.New("no # prefix") |
| 131 | } |
| 132 | _, err := hex.DecodeString(color[1:]) |
| 133 | return err |
| 134 | } |
| 135 | |
| 136 | // @Summary Update appearance |
| 137 | // @ID update-appearance |
no test coverage detected