Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Sep 6, 2024
1 parent 5a207ef commit 84c0423
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
18 changes: 12 additions & 6 deletions draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ type circle struct {
r int
}

const white = 0xFF
const black = 0x17
const (
white = 0xFF
black = 0x17
)

func (c *circle) ColorModel() color.Model {
return color.AlphaModel
Expand All @@ -31,8 +33,10 @@ func (c *circle) Bounds() image.Rectangle {
)
}

const halfPixel = 0.5
const doublingFactor = 2
const (
halfPixel = 0.5
doublingFactor = 2
)

func double(i int) int { return i * doublingFactor }
func half(i int) int { return i / doublingFactor }
Expand Down Expand Up @@ -224,8 +228,10 @@ func MakeWindowBar(termWidth, termHeight int, opts StyleOptions, file string) {
}
}

const barToDotRatio = 6
const barToDotBorderRatio = 5
const (
barToDotRatio = 6
barToDotBorderRatio = 5
)

func makeColorfulBar(termWidth int, termHeight int, isRight bool, opts StyleOptions, targetpng string) error {
// Radius of dots
Expand Down
2 changes: 1 addition & 1 deletion lexer/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (l *Lexer) readChar() {
func (l *Lexer) NextToken() token.Token {
l.skipWhitespace()

var tok = token.Token{Line: l.line, Column: l.column}
tok := token.Token{Line: l.line, Column: l.column}

switch l.ch {
case 0:
Expand Down
13 changes: 6 additions & 7 deletions themes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
package main

import (
"github.com/charmbracelet/glamour/ansi"

_ "embed"
"encoding/json"
"fmt"
"sort"
"strings"

"github.com/charmbracelet/glamour/ansi"

_ "embed"

"github.com/agnivade/levenshtein"
)

Expand Down Expand Up @@ -118,10 +119,8 @@ func boolPtr(b bool) *bool { return &b }
func stringPtr(s string) *string { return &s }
func uintPtr(u uint) *uint { return &u }

var (
//go:embed themes.json
themesBts []byte
)
//go:embed themes.json
var themesBts []byte

// ThemeNotFoundError is returned when a requested theme is not found.
type ThemeNotFoundError struct {
Expand Down

0 comments on commit 84c0423

Please sign in to comment.