-
Notifications
You must be signed in to change notification settings - Fork 7
/
generated.go
1363 lines (1136 loc) · 49.8 KB
/
generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package gchalk
// This file was generated. Don't edit it directly.
import (
"github.com/jwalton/gchalk/pkg/ansistyles"
)
// Black returns a string where the color is black.
func Black(str ...string) string {
return rootBuilder.WithBlack().applyStyle(str...)
}
// WithBlack returns a Builder that generates strings where the color is black,
// and further styles can be applied via chaining.
func WithBlack() *Builder {
return rootBuilder.WithBlack()
}
// Black returns a string where the color is black, in addition to other styles from this builder.
func (builder *Builder) Black(str ...string) string {
return builder.WithBlack().applyStyle(str...)
}
// WithBlack returns a Builder that generates strings where the color is black,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBlack() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.black == nil {
builder.black = createBuilder(builder, ansistyles.Black.Open, ansistyles.Black.Close)
}
return builder.black
}
// Blue returns a string where the color is blue.
func Blue(str ...string) string {
return rootBuilder.WithBlue().applyStyle(str...)
}
// WithBlue returns a Builder that generates strings where the color is blue,
// and further styles can be applied via chaining.
func WithBlue() *Builder {
return rootBuilder.WithBlue()
}
// Blue returns a string where the color is blue, in addition to other styles from this builder.
func (builder *Builder) Blue(str ...string) string {
return builder.WithBlue().applyStyle(str...)
}
// WithBlue returns a Builder that generates strings where the color is blue,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBlue() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.blue == nil {
builder.blue = createBuilder(builder, ansistyles.Blue.Open, ansistyles.Blue.Close)
}
return builder.blue
}
// BrightBlack returns a string where the color is brightBlack.
func BrightBlack(str ...string) string {
return rootBuilder.WithBrightBlack().applyStyle(str...)
}
// WithBrightBlack returns a Builder that generates strings where the color is brightBlack,
// and further styles can be applied via chaining.
func WithBrightBlack() *Builder {
return rootBuilder.WithBrightBlack()
}
// BrightBlack returns a string where the color is brightBlack, in addition to other styles from this builder.
func (builder *Builder) BrightBlack(str ...string) string {
return builder.WithBrightBlack().applyStyle(str...)
}
// WithBrightBlack returns a Builder that generates strings where the color is brightBlack,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightBlack() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightBlack == nil {
builder.brightBlack = createBuilder(builder, ansistyles.BrightBlack.Open, ansistyles.BrightBlack.Close)
}
return builder.brightBlack
}
// BrightBlue returns a string where the color is brightBlue.
func BrightBlue(str ...string) string {
return rootBuilder.WithBrightBlue().applyStyle(str...)
}
// WithBrightBlue returns a Builder that generates strings where the color is brightBlue,
// and further styles can be applied via chaining.
func WithBrightBlue() *Builder {
return rootBuilder.WithBrightBlue()
}
// BrightBlue returns a string where the color is brightBlue, in addition to other styles from this builder.
func (builder *Builder) BrightBlue(str ...string) string {
return builder.WithBrightBlue().applyStyle(str...)
}
// WithBrightBlue returns a Builder that generates strings where the color is brightBlue,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightBlue() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightBlue == nil {
builder.brightBlue = createBuilder(builder, ansistyles.BrightBlue.Open, ansistyles.BrightBlue.Close)
}
return builder.brightBlue
}
// BrightCyan returns a string where the color is brightCyan.
func BrightCyan(str ...string) string {
return rootBuilder.WithBrightCyan().applyStyle(str...)
}
// WithBrightCyan returns a Builder that generates strings where the color is brightCyan,
// and further styles can be applied via chaining.
func WithBrightCyan() *Builder {
return rootBuilder.WithBrightCyan()
}
// BrightCyan returns a string where the color is brightCyan, in addition to other styles from this builder.
func (builder *Builder) BrightCyan(str ...string) string {
return builder.WithBrightCyan().applyStyle(str...)
}
// WithBrightCyan returns a Builder that generates strings where the color is brightCyan,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightCyan() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightCyan == nil {
builder.brightCyan = createBuilder(builder, ansistyles.BrightCyan.Open, ansistyles.BrightCyan.Close)
}
return builder.brightCyan
}
// BrightGreen returns a string where the color is brightGreen.
func BrightGreen(str ...string) string {
return rootBuilder.WithBrightGreen().applyStyle(str...)
}
// WithBrightGreen returns a Builder that generates strings where the color is brightGreen,
// and further styles can be applied via chaining.
func WithBrightGreen() *Builder {
return rootBuilder.WithBrightGreen()
}
// BrightGreen returns a string where the color is brightGreen, in addition to other styles from this builder.
func (builder *Builder) BrightGreen(str ...string) string {
return builder.WithBrightGreen().applyStyle(str...)
}
// WithBrightGreen returns a Builder that generates strings where the color is brightGreen,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightGreen() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightGreen == nil {
builder.brightGreen = createBuilder(builder, ansistyles.BrightGreen.Open, ansistyles.BrightGreen.Close)
}
return builder.brightGreen
}
// BrightMagenta returns a string where the color is brightMagenta.
func BrightMagenta(str ...string) string {
return rootBuilder.WithBrightMagenta().applyStyle(str...)
}
// WithBrightMagenta returns a Builder that generates strings where the color is brightMagenta,
// and further styles can be applied via chaining.
func WithBrightMagenta() *Builder {
return rootBuilder.WithBrightMagenta()
}
// BrightMagenta returns a string where the color is brightMagenta, in addition to other styles from this builder.
func (builder *Builder) BrightMagenta(str ...string) string {
return builder.WithBrightMagenta().applyStyle(str...)
}
// WithBrightMagenta returns a Builder that generates strings where the color is brightMagenta,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightMagenta() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightMagenta == nil {
builder.brightMagenta = createBuilder(builder, ansistyles.BrightMagenta.Open, ansistyles.BrightMagenta.Close)
}
return builder.brightMagenta
}
// BrightRed returns a string where the color is brightRed.
func BrightRed(str ...string) string {
return rootBuilder.WithBrightRed().applyStyle(str...)
}
// WithBrightRed returns a Builder that generates strings where the color is brightRed,
// and further styles can be applied via chaining.
func WithBrightRed() *Builder {
return rootBuilder.WithBrightRed()
}
// BrightRed returns a string where the color is brightRed, in addition to other styles from this builder.
func (builder *Builder) BrightRed(str ...string) string {
return builder.WithBrightRed().applyStyle(str...)
}
// WithBrightRed returns a Builder that generates strings where the color is brightRed,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightRed() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightRed == nil {
builder.brightRed = createBuilder(builder, ansistyles.BrightRed.Open, ansistyles.BrightRed.Close)
}
return builder.brightRed
}
// BrightWhite returns a string where the color is brightWhite.
func BrightWhite(str ...string) string {
return rootBuilder.WithBrightWhite().applyStyle(str...)
}
// WithBrightWhite returns a Builder that generates strings where the color is brightWhite,
// and further styles can be applied via chaining.
func WithBrightWhite() *Builder {
return rootBuilder.WithBrightWhite()
}
// BrightWhite returns a string where the color is brightWhite, in addition to other styles from this builder.
func (builder *Builder) BrightWhite(str ...string) string {
return builder.WithBrightWhite().applyStyle(str...)
}
// WithBrightWhite returns a Builder that generates strings where the color is brightWhite,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightWhite() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightWhite == nil {
builder.brightWhite = createBuilder(builder, ansistyles.BrightWhite.Open, ansistyles.BrightWhite.Close)
}
return builder.brightWhite
}
// BrightYellow returns a string where the color is brightYellow.
func BrightYellow(str ...string) string {
return rootBuilder.WithBrightYellow().applyStyle(str...)
}
// WithBrightYellow returns a Builder that generates strings where the color is brightYellow,
// and further styles can be applied via chaining.
func WithBrightYellow() *Builder {
return rootBuilder.WithBrightYellow()
}
// BrightYellow returns a string where the color is brightYellow, in addition to other styles from this builder.
func (builder *Builder) BrightYellow(str ...string) string {
return builder.WithBrightYellow().applyStyle(str...)
}
// WithBrightYellow returns a Builder that generates strings where the color is brightYellow,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBrightYellow() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.brightYellow == nil {
builder.brightYellow = createBuilder(builder, ansistyles.BrightYellow.Open, ansistyles.BrightYellow.Close)
}
return builder.brightYellow
}
// Cyan returns a string where the color is cyan.
func Cyan(str ...string) string {
return rootBuilder.WithCyan().applyStyle(str...)
}
// WithCyan returns a Builder that generates strings where the color is cyan,
// and further styles can be applied via chaining.
func WithCyan() *Builder {
return rootBuilder.WithCyan()
}
// Cyan returns a string where the color is cyan, in addition to other styles from this builder.
func (builder *Builder) Cyan(str ...string) string {
return builder.WithCyan().applyStyle(str...)
}
// WithCyan returns a Builder that generates strings where the color is cyan,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithCyan() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.cyan == nil {
builder.cyan = createBuilder(builder, ansistyles.Cyan.Open, ansistyles.Cyan.Close)
}
return builder.cyan
}
// Gray returns a string where the color is gray.
func Gray(str ...string) string {
return rootBuilder.WithGray().applyStyle(str...)
}
// WithGray returns a Builder that generates strings where the color is gray,
// and further styles can be applied via chaining.
func WithGray() *Builder {
return rootBuilder.WithGray()
}
// Gray returns a string where the color is gray, in addition to other styles from this builder.
func (builder *Builder) Gray(str ...string) string {
return builder.WithGray().applyStyle(str...)
}
// WithGray returns a Builder that generates strings where the color is gray,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithGray() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.gray == nil {
builder.gray = createBuilder(builder, ansistyles.Gray.Open, ansistyles.Gray.Close)
}
return builder.gray
}
// Green returns a string where the color is green.
func Green(str ...string) string {
return rootBuilder.WithGreen().applyStyle(str...)
}
// WithGreen returns a Builder that generates strings where the color is green,
// and further styles can be applied via chaining.
func WithGreen() *Builder {
return rootBuilder.WithGreen()
}
// Green returns a string where the color is green, in addition to other styles from this builder.
func (builder *Builder) Green(str ...string) string {
return builder.WithGreen().applyStyle(str...)
}
// WithGreen returns a Builder that generates strings where the color is green,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithGreen() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.green == nil {
builder.green = createBuilder(builder, ansistyles.Green.Open, ansistyles.Green.Close)
}
return builder.green
}
// Grey returns a string where the color is grey.
func Grey(str ...string) string {
return rootBuilder.WithGrey().applyStyle(str...)
}
// WithGrey returns a Builder that generates strings where the color is grey,
// and further styles can be applied via chaining.
func WithGrey() *Builder {
return rootBuilder.WithGrey()
}
// Grey returns a string where the color is grey, in addition to other styles from this builder.
func (builder *Builder) Grey(str ...string) string {
return builder.WithGrey().applyStyle(str...)
}
// WithGrey returns a Builder that generates strings where the color is grey,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithGrey() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.grey == nil {
builder.grey = createBuilder(builder, ansistyles.Grey.Open, ansistyles.Grey.Close)
}
return builder.grey
}
// Magenta returns a string where the color is magenta.
func Magenta(str ...string) string {
return rootBuilder.WithMagenta().applyStyle(str...)
}
// WithMagenta returns a Builder that generates strings where the color is magenta,
// and further styles can be applied via chaining.
func WithMagenta() *Builder {
return rootBuilder.WithMagenta()
}
// Magenta returns a string where the color is magenta, in addition to other styles from this builder.
func (builder *Builder) Magenta(str ...string) string {
return builder.WithMagenta().applyStyle(str...)
}
// WithMagenta returns a Builder that generates strings where the color is magenta,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithMagenta() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.magenta == nil {
builder.magenta = createBuilder(builder, ansistyles.Magenta.Open, ansistyles.Magenta.Close)
}
return builder.magenta
}
// Red returns a string where the color is red.
func Red(str ...string) string {
return rootBuilder.WithRed().applyStyle(str...)
}
// WithRed returns a Builder that generates strings where the color is red,
// and further styles can be applied via chaining.
func WithRed() *Builder {
return rootBuilder.WithRed()
}
// Red returns a string where the color is red, in addition to other styles from this builder.
func (builder *Builder) Red(str ...string) string {
return builder.WithRed().applyStyle(str...)
}
// WithRed returns a Builder that generates strings where the color is red,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithRed() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.red == nil {
builder.red = createBuilder(builder, ansistyles.Red.Open, ansistyles.Red.Close)
}
return builder.red
}
// White returns a string where the color is white.
func White(str ...string) string {
return rootBuilder.WithWhite().applyStyle(str...)
}
// WithWhite returns a Builder that generates strings where the color is white,
// and further styles can be applied via chaining.
func WithWhite() *Builder {
return rootBuilder.WithWhite()
}
// White returns a string where the color is white, in addition to other styles from this builder.
func (builder *Builder) White(str ...string) string {
return builder.WithWhite().applyStyle(str...)
}
// WithWhite returns a Builder that generates strings where the color is white,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithWhite() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.white == nil {
builder.white = createBuilder(builder, ansistyles.White.Open, ansistyles.White.Close)
}
return builder.white
}
// Yellow returns a string where the color is yellow.
func Yellow(str ...string) string {
return rootBuilder.WithYellow().applyStyle(str...)
}
// WithYellow returns a Builder that generates strings where the color is yellow,
// and further styles can be applied via chaining.
func WithYellow() *Builder {
return rootBuilder.WithYellow()
}
// Yellow returns a string where the color is yellow, in addition to other styles from this builder.
func (builder *Builder) Yellow(str ...string) string {
return builder.WithYellow().applyStyle(str...)
}
// WithYellow returns a Builder that generates strings where the color is yellow,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithYellow() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.yellow == nil {
builder.yellow = createBuilder(builder, ansistyles.Yellow.Open, ansistyles.Yellow.Close)
}
return builder.yellow
}
// BgBlack returns a string where the background color is Black.
func BgBlack(str ...string) string {
return rootBuilder.WithBgBlack().applyStyle(str...)
}
// WithBgBlack returns a Builder that generates strings where the background color is Black,
// and further styles can be applied via chaining.
func WithBgBlack() *Builder {
return rootBuilder.WithBgBlack()
}
// BgBlack returns a string where the background color is Black, in addition to other styles from this builder.
func (builder *Builder) BgBlack(str ...string) string {
return builder.WithBgBlack().applyStyle(str...)
}
// WithBgBlack returns a Builder that generates strings where the background color is Black,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBlack() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBlack == nil {
builder.bgBlack = createBuilder(builder, ansistyles.BgBlack.Open, ansistyles.BgBlack.Close)
}
return builder.bgBlack
}
// BgBlue returns a string where the background color is Blue.
func BgBlue(str ...string) string {
return rootBuilder.WithBgBlue().applyStyle(str...)
}
// WithBgBlue returns a Builder that generates strings where the background color is Blue,
// and further styles can be applied via chaining.
func WithBgBlue() *Builder {
return rootBuilder.WithBgBlue()
}
// BgBlue returns a string where the background color is Blue, in addition to other styles from this builder.
func (builder *Builder) BgBlue(str ...string) string {
return builder.WithBgBlue().applyStyle(str...)
}
// WithBgBlue returns a Builder that generates strings where the background color is Blue,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBlue() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBlue == nil {
builder.bgBlue = createBuilder(builder, ansistyles.BgBlue.Open, ansistyles.BgBlue.Close)
}
return builder.bgBlue
}
// BgBrightBlack returns a string where the background color is BrightBlack.
func BgBrightBlack(str ...string) string {
return rootBuilder.WithBgBrightBlack().applyStyle(str...)
}
// WithBgBrightBlack returns a Builder that generates strings where the background color is BrightBlack,
// and further styles can be applied via chaining.
func WithBgBrightBlack() *Builder {
return rootBuilder.WithBgBrightBlack()
}
// BgBrightBlack returns a string where the background color is BrightBlack, in addition to other styles from this builder.
func (builder *Builder) BgBrightBlack(str ...string) string {
return builder.WithBgBrightBlack().applyStyle(str...)
}
// WithBgBrightBlack returns a Builder that generates strings where the background color is BrightBlack,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightBlack() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightBlack == nil {
builder.bgBrightBlack = createBuilder(builder, ansistyles.BgBrightBlack.Open, ansistyles.BgBrightBlack.Close)
}
return builder.bgBrightBlack
}
// BgBrightBlue returns a string where the background color is BrightBlue.
func BgBrightBlue(str ...string) string {
return rootBuilder.WithBgBrightBlue().applyStyle(str...)
}
// WithBgBrightBlue returns a Builder that generates strings where the background color is BrightBlue,
// and further styles can be applied via chaining.
func WithBgBrightBlue() *Builder {
return rootBuilder.WithBgBrightBlue()
}
// BgBrightBlue returns a string where the background color is BrightBlue, in addition to other styles from this builder.
func (builder *Builder) BgBrightBlue(str ...string) string {
return builder.WithBgBrightBlue().applyStyle(str...)
}
// WithBgBrightBlue returns a Builder that generates strings where the background color is BrightBlue,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightBlue() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightBlue == nil {
builder.bgBrightBlue = createBuilder(builder, ansistyles.BgBrightBlue.Open, ansistyles.BgBrightBlue.Close)
}
return builder.bgBrightBlue
}
// BgBrightCyan returns a string where the background color is BrightCyan.
func BgBrightCyan(str ...string) string {
return rootBuilder.WithBgBrightCyan().applyStyle(str...)
}
// WithBgBrightCyan returns a Builder that generates strings where the background color is BrightCyan,
// and further styles can be applied via chaining.
func WithBgBrightCyan() *Builder {
return rootBuilder.WithBgBrightCyan()
}
// BgBrightCyan returns a string where the background color is BrightCyan, in addition to other styles from this builder.
func (builder *Builder) BgBrightCyan(str ...string) string {
return builder.WithBgBrightCyan().applyStyle(str...)
}
// WithBgBrightCyan returns a Builder that generates strings where the background color is BrightCyan,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightCyan() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightCyan == nil {
builder.bgBrightCyan = createBuilder(builder, ansistyles.BgBrightCyan.Open, ansistyles.BgBrightCyan.Close)
}
return builder.bgBrightCyan
}
// BgBrightGreen returns a string where the background color is BrightGreen.
func BgBrightGreen(str ...string) string {
return rootBuilder.WithBgBrightGreen().applyStyle(str...)
}
// WithBgBrightGreen returns a Builder that generates strings where the background color is BrightGreen,
// and further styles can be applied via chaining.
func WithBgBrightGreen() *Builder {
return rootBuilder.WithBgBrightGreen()
}
// BgBrightGreen returns a string where the background color is BrightGreen, in addition to other styles from this builder.
func (builder *Builder) BgBrightGreen(str ...string) string {
return builder.WithBgBrightGreen().applyStyle(str...)
}
// WithBgBrightGreen returns a Builder that generates strings where the background color is BrightGreen,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightGreen() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightGreen == nil {
builder.bgBrightGreen = createBuilder(builder, ansistyles.BgBrightGreen.Open, ansistyles.BgBrightGreen.Close)
}
return builder.bgBrightGreen
}
// BgBrightMagenta returns a string where the background color is BrightMagenta.
func BgBrightMagenta(str ...string) string {
return rootBuilder.WithBgBrightMagenta().applyStyle(str...)
}
// WithBgBrightMagenta returns a Builder that generates strings where the background color is BrightMagenta,
// and further styles can be applied via chaining.
func WithBgBrightMagenta() *Builder {
return rootBuilder.WithBgBrightMagenta()
}
// BgBrightMagenta returns a string where the background color is BrightMagenta, in addition to other styles from this builder.
func (builder *Builder) BgBrightMagenta(str ...string) string {
return builder.WithBgBrightMagenta().applyStyle(str...)
}
// WithBgBrightMagenta returns a Builder that generates strings where the background color is BrightMagenta,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightMagenta() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightMagenta == nil {
builder.bgBrightMagenta = createBuilder(builder, ansistyles.BgBrightMagenta.Open, ansistyles.BgBrightMagenta.Close)
}
return builder.bgBrightMagenta
}
// BgBrightRed returns a string where the background color is BrightRed.
func BgBrightRed(str ...string) string {
return rootBuilder.WithBgBrightRed().applyStyle(str...)
}
// WithBgBrightRed returns a Builder that generates strings where the background color is BrightRed,
// and further styles can be applied via chaining.
func WithBgBrightRed() *Builder {
return rootBuilder.WithBgBrightRed()
}
// BgBrightRed returns a string where the background color is BrightRed, in addition to other styles from this builder.
func (builder *Builder) BgBrightRed(str ...string) string {
return builder.WithBgBrightRed().applyStyle(str...)
}
// WithBgBrightRed returns a Builder that generates strings where the background color is BrightRed,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightRed() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightRed == nil {
builder.bgBrightRed = createBuilder(builder, ansistyles.BgBrightRed.Open, ansistyles.BgBrightRed.Close)
}
return builder.bgBrightRed
}
// BgBrightWhite returns a string where the background color is BrightWhite.
func BgBrightWhite(str ...string) string {
return rootBuilder.WithBgBrightWhite().applyStyle(str...)
}
// WithBgBrightWhite returns a Builder that generates strings where the background color is BrightWhite,
// and further styles can be applied via chaining.
func WithBgBrightWhite() *Builder {
return rootBuilder.WithBgBrightWhite()
}
// BgBrightWhite returns a string where the background color is BrightWhite, in addition to other styles from this builder.
func (builder *Builder) BgBrightWhite(str ...string) string {
return builder.WithBgBrightWhite().applyStyle(str...)
}
// WithBgBrightWhite returns a Builder that generates strings where the background color is BrightWhite,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightWhite() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightWhite == nil {
builder.bgBrightWhite = createBuilder(builder, ansistyles.BgBrightWhite.Open, ansistyles.BgBrightWhite.Close)
}
return builder.bgBrightWhite
}
// BgBrightYellow returns a string where the background color is BrightYellow.
func BgBrightYellow(str ...string) string {
return rootBuilder.WithBgBrightYellow().applyStyle(str...)
}
// WithBgBrightYellow returns a Builder that generates strings where the background color is BrightYellow,
// and further styles can be applied via chaining.
func WithBgBrightYellow() *Builder {
return rootBuilder.WithBgBrightYellow()
}
// BgBrightYellow returns a string where the background color is BrightYellow, in addition to other styles from this builder.
func (builder *Builder) BgBrightYellow(str ...string) string {
return builder.WithBgBrightYellow().applyStyle(str...)
}
// WithBgBrightYellow returns a Builder that generates strings where the background color is BrightYellow,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgBrightYellow() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgBrightYellow == nil {
builder.bgBrightYellow = createBuilder(builder, ansistyles.BgBrightYellow.Open, ansistyles.BgBrightYellow.Close)
}
return builder.bgBrightYellow
}
// BgCyan returns a string where the background color is Cyan.
func BgCyan(str ...string) string {
return rootBuilder.WithBgCyan().applyStyle(str...)
}
// WithBgCyan returns a Builder that generates strings where the background color is Cyan,
// and further styles can be applied via chaining.
func WithBgCyan() *Builder {
return rootBuilder.WithBgCyan()
}
// BgCyan returns a string where the background color is Cyan, in addition to other styles from this builder.
func (builder *Builder) BgCyan(str ...string) string {
return builder.WithBgCyan().applyStyle(str...)
}
// WithBgCyan returns a Builder that generates strings where the background color is Cyan,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgCyan() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgCyan == nil {
builder.bgCyan = createBuilder(builder, ansistyles.BgCyan.Open, ansistyles.BgCyan.Close)
}
return builder.bgCyan
}
// BgGray returns a string where the background color is Gray.
func BgGray(str ...string) string {
return rootBuilder.WithBgGray().applyStyle(str...)
}
// WithBgGray returns a Builder that generates strings where the background color is Gray,
// and further styles can be applied via chaining.
func WithBgGray() *Builder {
return rootBuilder.WithBgGray()
}
// BgGray returns a string where the background color is Gray, in addition to other styles from this builder.
func (builder *Builder) BgGray(str ...string) string {
return builder.WithBgGray().applyStyle(str...)
}
// WithBgGray returns a Builder that generates strings where the background color is Gray,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgGray() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgGray == nil {
builder.bgGray = createBuilder(builder, ansistyles.BgGray.Open, ansistyles.BgGray.Close)
}
return builder.bgGray
}
// BgGreen returns a string where the background color is Green.
func BgGreen(str ...string) string {
return rootBuilder.WithBgGreen().applyStyle(str...)
}
// WithBgGreen returns a Builder that generates strings where the background color is Green,
// and further styles can be applied via chaining.
func WithBgGreen() *Builder {
return rootBuilder.WithBgGreen()
}
// BgGreen returns a string where the background color is Green, in addition to other styles from this builder.
func (builder *Builder) BgGreen(str ...string) string {
return builder.WithBgGreen().applyStyle(str...)
}
// WithBgGreen returns a Builder that generates strings where the background color is Green,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgGreen() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgGreen == nil {
builder.bgGreen = createBuilder(builder, ansistyles.BgGreen.Open, ansistyles.BgGreen.Close)
}
return builder.bgGreen
}
// BgGrey returns a string where the background color is Grey.
func BgGrey(str ...string) string {
return rootBuilder.WithBgGrey().applyStyle(str...)
}
// WithBgGrey returns a Builder that generates strings where the background color is Grey,
// and further styles can be applied via chaining.
func WithBgGrey() *Builder {
return rootBuilder.WithBgGrey()
}
// BgGrey returns a string where the background color is Grey, in addition to other styles from this builder.
func (builder *Builder) BgGrey(str ...string) string {
return builder.WithBgGrey().applyStyle(str...)
}
// WithBgGrey returns a Builder that generates strings where the background color is Grey,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgGrey() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgGrey == nil {
builder.bgGrey = createBuilder(builder, ansistyles.BgGrey.Open, ansistyles.BgGrey.Close)
}
return builder.bgGrey
}
// BgMagenta returns a string where the background color is Magenta.
func BgMagenta(str ...string) string {
return rootBuilder.WithBgMagenta().applyStyle(str...)
}
// WithBgMagenta returns a Builder that generates strings where the background color is Magenta,
// and further styles can be applied via chaining.
func WithBgMagenta() *Builder {
return rootBuilder.WithBgMagenta()
}
// BgMagenta returns a string where the background color is Magenta, in addition to other styles from this builder.
func (builder *Builder) BgMagenta(str ...string) string {
return builder.WithBgMagenta().applyStyle(str...)
}
// WithBgMagenta returns a Builder that generates strings where the background color is Magenta,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgMagenta() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgMagenta == nil {
builder.bgMagenta = createBuilder(builder, ansistyles.BgMagenta.Open, ansistyles.BgMagenta.Close)
}
return builder.bgMagenta
}
// BgRed returns a string where the background color is Red.
func BgRed(str ...string) string {
return rootBuilder.WithBgRed().applyStyle(str...)
}
// WithBgRed returns a Builder that generates strings where the background color is Red,
// and further styles can be applied via chaining.
func WithBgRed() *Builder {
return rootBuilder.WithBgRed()
}
// BgRed returns a string where the background color is Red, in addition to other styles from this builder.
func (builder *Builder) BgRed(str ...string) string {
return builder.WithBgRed().applyStyle(str...)
}
// WithBgRed returns a Builder that generates strings where the background color is Red,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgRed() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgRed == nil {
builder.bgRed = createBuilder(builder, ansistyles.BgRed.Open, ansistyles.BgRed.Close)
}
return builder.bgRed
}
// BgWhite returns a string where the background color is White.
func BgWhite(str ...string) string {
return rootBuilder.WithBgWhite().applyStyle(str...)
}
// WithBgWhite returns a Builder that generates strings where the background color is White,
// and further styles can be applied via chaining.
func WithBgWhite() *Builder {
return rootBuilder.WithBgWhite()
}
// BgWhite returns a string where the background color is White, in addition to other styles from this builder.
func (builder *Builder) BgWhite(str ...string) string {
return builder.WithBgWhite().applyStyle(str...)
}
// WithBgWhite returns a Builder that generates strings where the background color is White,
// in addition to other styles from this builder, and further styles can be applied via chaining.
func (builder *Builder) WithBgWhite() *Builder {
builder.shared.mutex.Lock()
defer builder.shared.mutex.Unlock()
if builder.bgWhite == nil {
builder.bgWhite = createBuilder(builder, ansistyles.BgWhite.Open, ansistyles.BgWhite.Close)
}
return builder.bgWhite
}
// BgYellow returns a string where the background color is Yellow.
func BgYellow(str ...string) string {
return rootBuilder.WithBgYellow().applyStyle(str...)
}
// WithBgYellow returns a Builder that generates strings where the background color is Yellow,
// and further styles can be applied via chaining.
func WithBgYellow() *Builder {
return rootBuilder.WithBgYellow()
}
// BgYellow returns a string where the background color is Yellow, in addition to other styles from this builder.