summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-12-17 13:35:42 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-12-17 13:35:42 +0100
commit1536418772e4068ac114b3c8097f152ed54ff267 (patch)
tree15d3cd6d3b7d667a79e4f3e449c1bf6edad6659e
parent3faa0bfb54e4368223ac7f0a894112e6f9266fa2 (diff)
Cleanup
-rw-r--r--main.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/main.go b/main.go
index b5b0174..2e2fae4 100644
--- a/main.go
+++ b/main.go
@@ -14,21 +14,6 @@ import (
plist "github.com/DHowett/go-plist"
)
-type Color struct {
- Alpha float64 `plist:"Alpha Component"`
- Red float64 `plist:"Red Component"`
- Green float64 `plist:"Green Component"`
- Blue float64 `plist:"Blue Component"`
- Space string `plist:"Color Space"`
-}
-
-func (c Color) String() string {
- r := int(math.MaxUint8 * c.Red)
- g := int(math.MaxUint8 * c.Green)
- b := int(math.MaxUint8 * c.Blue)
- return fmt.Sprintf("#%02x%02x%02x", r, g, b)
-}
-
const t = `! Color scheme: {{.Name}}
*VT100*foreground: {{.Foreground}}
*VT100*background: {{.Background}}
@@ -93,6 +78,21 @@ type Scheme struct {
Selection Color `plist:"Selection Color"`
}
+type Color struct {
+ Alpha float64 `plist:"Alpha Component"`
+ Red float64 `plist:"Red Component"`
+ Green float64 `plist:"Green Component"`
+ Blue float64 `plist:"Blue Component"`
+ Space string `plist:"Color Space"`
+}
+
+func (c Color) String() string {
+ r := int(math.MaxUint8 * c.Red)
+ g := int(math.MaxUint8 * c.Green)
+ b := int(math.MaxUint8 * c.Blue)
+ return fmt.Sprintf("#%02x%02x%02x", r, g, b)
+}
+
func name(s string) string {
return strings.TrimSuffix(filepath.Base(s), filepath.Ext(s))
}