Skip to content

Commit 55bc95e

Browse files
committed
update copyright date
Signed-off-by: Brian Downs <[email protected]>
1 parent 1935ea5 commit 55bc95e

File tree

4 files changed

+12
-19
lines changed

4 files changed

+12
-19
lines changed

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Spinner
2-
Copyright (c) 2021 Brian J. Downs
2+
Copyright (c) 2022 Brian J. Downs
33
This product is licensed to you under the Apache 2.0 license (the "License"). You may not use this product except in compliance with the Apache 2.0 License.
44
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.

_example/main.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ func main() {
1616

1717
s.UpdateCharSet(spinner.CharSets[9]) // Update spinner to use a different character set
1818
s.UpdateSpeed(100 * time.Millisecond) // Update the speed the spinner spins at
19-
s.HideCursor = true
20-
s.Prefix = "prefixed text: " // Prefix text before the spinner
19+
s.Prefix = "prefixed text: " // Prefix text before the spinner
2120
time.Sleep(4 * time.Second)
2221
s.Prefix = ""
23-
s.Suffix = " :appended text" // Append text after the spinner
22+
s.Suffix = " :appended text" // Append text after the spinner
2423
time.Sleep(4 * time.Second)
2524

2625
s.Prefix = "Colors: "
@@ -48,7 +47,6 @@ func main() {
4847
}
4948

5049
s.UpdateCharSet(spinner.CharSets[3])
51-
5250
s.Restart()
5351

5452
time.Sleep(4 * time.Second) // Run for some time to simulate work
@@ -58,9 +56,7 @@ func main() {
5856
}
5957

6058
s.UpdateCharSet(spinner.CharSets[28])
61-
6259
s.Reverse()
63-
6460
s.Restart()
6561

6662
time.Sleep(4 * time.Second) // Run for some time to simulate work
@@ -70,7 +66,6 @@ func main() {
7066
}
7167

7268
s.UpdateCharSet(spinner.CharSets[25])
73-
7469
s.Restart()
7570

7671
time.Sleep(4 * time.Second) // Run for some time to simulate work
@@ -80,7 +75,6 @@ func main() {
8075
}
8176

8277
s.UpdateCharSet(spinner.CharSets[32])
83-
8478
s.Restart()
8579

8680
time.Sleep(4 * time.Second) // Run for some time to simulate work
@@ -92,7 +86,6 @@ func main() {
9286
s.FinalMSG = "Complete!\nNew line!\nAnother one!\n"
9387

9488
s.UpdateCharSet(spinner.CharSets[31])
95-
9689
s.Restart()
9790

9891
time.Sleep(4 * time.Second) // Run for some time to simulate work
@@ -101,7 +94,6 @@ func main() {
10194

10295
s.Prefix = "Earth! "
10396
s.UpdateCharSet(spinner.CharSets[39])
104-
10597
s.Restart()
10698

10799
time.Sleep(4 * time.Second) // Run for some time to simulate work

character_sets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 Brian J. Downs
1+
// Copyright (c) 2022 Brian J. Downs
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

spinner.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,14 @@ type Spinner struct {
192192
// New provides a pointer to an instance of Spinner with the supplied options.
193193
func New(cs []string, d time.Duration, options ...Option) *Spinner {
194194
s := &Spinner{
195-
Delay: d,
196-
chars: cs,
197-
color: color.New(color.FgWhite).SprintFunc(),
198-
mu: &sync.RWMutex{},
199-
Writer: color.Output,
200-
active: false,
201-
stopChan: make(chan struct{}, 1),
195+
Delay: d,
196+
chars: cs,
197+
color: color.New(color.FgWhite).SprintFunc(),
198+
mu: &sync.RWMutex{},
199+
Writer: color.Output,
200+
stopChan: make(chan struct{}, 1),
201+
active: false,
202+
HideCursor: true,
202203
}
203204

204205
for _, option := range options {

0 commit comments

Comments
 (0)