Skip to content

Commit 90f39f1

Browse files
committed
End top-level comments with a period
1 parent c9ef46f commit 90f39f1

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

ansicolors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const (
1919
ANSIBrightWhite
2020
)
2121

22-
// RGB values of ANSI colors (0-255)
22+
// RGB values of ANSI colors (0-255).
2323
var ansiHex = []string{
2424
"#000000",
2525
"#800000",

color.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ type Color interface {
2525

2626
type NoColor struct{}
2727

28-
// ANSIColor is a color (0-15) as defined by the ANSI Standard
28+
// ANSIColor is a color (0-15) as defined by the ANSI Standard.
2929
type ANSIColor int
3030

31-
// ANSI256Color is a color (16-255) as defined by the ANSI Standard
31+
// ANSI256Color is a color (16-255) as defined by the ANSI Standard.
3232
type ANSI256Color int
3333

34-
// RGBColor is a hex-encoded color, e.g. "#abcdef"
34+
// RGBColor is a hex-encoded color, e.g. "#abcdef".
3535
type RGBColor string
3636

3737
func ConvertToRGB(c Color) colorful.Color {

style.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Style struct {
2525
styles []string
2626
}
2727

28-
// String returns a new Style
28+
// String returns a new Style.
2929
func String(s ...string) Style {
3030
return Style{
3131
string: strings.Join(s, " "),
@@ -36,7 +36,7 @@ func (t Style) String() string {
3636
return t.Styled(t.string)
3737
}
3838

39-
// Styled renders s with all applied styles
39+
// Styled renders s with all applied styles.
4040
func (t Style) Styled(s string) string {
4141
if len(t.styles) == 0 {
4242
return s
@@ -50,65 +50,65 @@ func (t Style) Styled(s string) string {
5050
return fmt.Sprintf("%s%sm%s%sm", CSI, seq, s, CSI+ResetSeq)
5151
}
5252

53-
// Foreground sets a foreground color
53+
// Foreground sets a foreground color.
5454
func (t Style) Foreground(c Color) Style {
5555
if c != nil {
5656
t.styles = append(t.styles, c.Sequence(false))
5757
}
5858
return t
5959
}
6060

61-
// Background sets a background color
61+
// Background sets a background color.
6262
func (t Style) Background(c Color) Style {
6363
if c != nil {
6464
t.styles = append(t.styles, c.Sequence(true))
6565
}
6666
return t
6767
}
6868

69-
// Bold enables bold rendering
69+
// Bold enables bold rendering.
7070
func (t Style) Bold() Style {
7171
t.styles = append(t.styles, BoldSeq)
7272
return t
7373
}
7474

75-
// Faint enables faint rendering
75+
// Faint enables faint rendering.
7676
func (t Style) Faint() Style {
7777
t.styles = append(t.styles, FaintSeq)
7878
return t
7979
}
8080

81-
// Italic enables italic rendering
81+
// Italic enables italic rendering.
8282
func (t Style) Italic() Style {
8383
t.styles = append(t.styles, ItalicSeq)
8484
return t
8585
}
8686

87-
// Underline enables underline rendering
87+
// Underline enables underline rendering.
8888
func (t Style) Underline() Style {
8989
t.styles = append(t.styles, UnderlineSeq)
9090
return t
9191
}
9292

93-
// Overline enables overline rendering
93+
// Overline enables overline rendering.
9494
func (t Style) Overline() Style {
9595
t.styles = append(t.styles, OverlineSeq)
9696
return t
9797
}
9898

99-
// Blink enables blink mode
99+
// Blink enables blink mode.
100100
func (t Style) Blink() Style {
101101
t.styles = append(t.styles, BlinkSeq)
102102
return t
103103
}
104104

105-
// Reverse enables reverse color mode
105+
// Reverse enables reverse color mode.
106106
func (t Style) Reverse() Style {
107107
t.styles = append(t.styles, ReverseSeq)
108108
return t
109109
}
110110

111-
// CrossOut enables crossed-out rendering
111+
// CrossOut enables crossed-out rendering.
112112
func (t Style) CrossOut() Style {
113113
t.styles = append(t.styles, CrossOutSeq)
114114
return t

templatehelper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"text/template"
55
)
66

7-
// TemplateFuncs contains a few useful template helpers
7+
// TemplateFuncs contains a few useful template helpers.
88
func TemplateFuncs(p Profile) template.FuncMap {
99
return template.FuncMap{
1010
"Color": func(values ...interface{}) string {

termenv.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
)
2424

2525
// ColorProfile returns the supported color profile:
26-
// Ascii, ANSI, ANSI256, or TrueColor
26+
// Ascii, ANSI, ANSI256, or TrueColor.
2727
func ColorProfile() Profile {
2828
if !isatty.IsTerminal(os.Stdout.Fd()) {
2929
return Ascii
@@ -32,7 +32,7 @@ func ColorProfile() Profile {
3232
return colorProfile()
3333
}
3434

35-
// ForegroundColor returns the terminal's default foreground color
35+
// ForegroundColor returns the terminal's default foreground color.
3636
func ForegroundColor() Color {
3737
if !isatty.IsTerminal(os.Stdout.Fd()) {
3838
return NoColor{}
@@ -41,7 +41,7 @@ func ForegroundColor() Color {
4141
return foregroundColor()
4242
}
4343

44-
// BackgroundColor returns the terminal's default background color
44+
// BackgroundColor returns the terminal's default background color.
4545
func BackgroundColor() Color {
4646
if !isatty.IsTerminal(os.Stdout.Fd()) {
4747
return NoColor{}
@@ -50,7 +50,7 @@ func BackgroundColor() Color {
5050
return backgroundColor()
5151
}
5252

53-
// HasDarkBackground returns whether terminal uses a dark-ish background
53+
// HasDarkBackground returns whether terminal uses a dark-ish background.
5454
func HasDarkBackground() bool {
5555
c := ConvertToRGB(BackgroundColor())
5656
_, _, l := c.Hsl()
@@ -61,7 +61,7 @@ func HasDarkBackground() bool {
6161
// by setting NO_COLOR (https://no-color.org/)
6262
// or CLICOLOR/CLICOLOR_FORCE (https://bixense.com/clicolors/)
6363
// If NO_COLOR is set, this will return true, ignoring CLICOLOR/CLICOLOR_FORCE
64-
// If CLICOLOR=="0", it will be true only if CLICOLOR_FORCE is also "0" or is unset
64+
// If CLICOLOR=="0", it will be true only if CLICOLOR_FORCE is also "0" or is unset.
6565
func EnvNoColor() bool {
6666
return os.Getenv("NO_COLOR") != "" || (os.Getenv("CLICOLOR") == "0" && !cliColorForced())
6767
}

0 commit comments

Comments
 (0)