File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ linters:
6262 # Reports uses of functions with replacement inside the testing package.
6363 - usetesting
6464
65+ # Make sure exported struct functions are declared before unexported ones
66+ - funcorder
67+
6568 settings :
6669 revive :
6770 rules :
Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ func New(out io.Writer) *Spinner {
2424 return s
2525}
2626
27- // print prints the given string to the output, ensuring consistent width.
28- func (s * Spinner ) print (str string ) {
29- s .maxChars = max (s .maxChars , len (str ))
30- fmt .Fprintf (s .out , "%*s" , s .maxChars , str )
31- }
32-
3327// Start begins the spinner animation with the initial message.
3428func (s * Spinner ) Start (ctx context.Context , str string ) {
3529 s .print (str )
@@ -63,3 +57,9 @@ func (s *Spinner) Done(format string, args ...any) {
6357 close (s .done )
6458 close (s .tick )
6559}
60+
61+ // print prints the given string to the output, ensuring consistent width.
62+ func (s * Spinner ) print (str string ) {
63+ s .maxChars = max (s .maxChars , len (str ))
64+ fmt .Fprintf (s .out , "%*s" , s .maxChars , str )
65+ }
You can’t perform that action at this time.
0 commit comments