-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-go.txt
876 lines (583 loc) · 23.5 KB
/
run-tests-go.txt
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
Running automated test file(s):
Go packages: lasagna
===============================================================================
Running: ../../.github/citools/go/go-lint-golangci-lint
Running GoLangCi-Lint
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.015s
user 0m0.005s
sys 0m0.013s
==============================================================================
Running: golangci-lint run --enable-all ./...
level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner. "
level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming)."
level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref."
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'."
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=warning msg="[runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct."
lasagna_master_test.go:61: File is not `gofumpt`-ed (gofumpt)
lasagna_master_test.go:94: File is not `gofumpt`-ed (gofumpt)
"mozzarella"},
lasagna_master_test.go:105: File is not `gofumpt`-ed (gofumpt)
"mozzarella"},
lasagna_master_test.go:161: line is 127 characters (lll)
t.Errorf("addSecretIngredient permuted friendsList (was %v, now %v), should not alter inputs", tt.friendsList, friendsList)
lasagna_master_test.go:207: line is 128 characters (lll)
t.Errorf("ScaleRecipe(%v, %d) produced slice of length %d, expected %d", inputList, tt.portions, len(got), len(tt.expected))
lasagna_master_test.go:57:30: Using the variable on range scope `tt` in function literal (scopelint)
if got := PreparationTime(tt.layers, tt.time); got != tt.expected {
^
lasagna_master_test.go:58:55: Using the variable on range scope `tt` in function literal (scopelint)
t.Errorf("PreparationTime(%v, %d) = %d; want %d", tt.layers, tt.time, got, tt.expected)
^
lasagna_master_test.go:123:39: Using the variable on range scope `tt` in function literal (scopelint)
gotNoodles, gotSauce := Quantities(tt.layers)
^
lasagna_master.go:17:2: declarations should never be cuddled (wsl)
var sauce float64
^
lasagna_master_test.go:62:2: block should not end with a whitespace (or comment) (wsl)
}
^
lasagna_master.go:50:39: mnd: Magic number: 2.0, in <argument> detected (gomnd)
singles = append(singles, quantity/2.0)
^
lasagna_master_test.go:15:1: Function TestPreparationTime missing the call to method parallel (paralleltest)
func TestPreparationTime(t *testing.T) {
^
lasagna_master_test.go:55:2: Range statement for test TestPreparationTime missing the call to method parallel in test Run (paralleltest)
for _, tt := range tests {
^
lasagna_master_test.go:72:1: Function TestQuantities missing the call to method parallel (paralleltest)
func TestQuantities(t *testing.T) {
^
lasagna_master_test.go:121:2: Range statement for test TestQuantities missing the call to method parallel in test Run (paralleltest)
for _, tt := range tests {
^
lasagna_master_test.go:141:1: Function TestAddSecretIngredient missing the call to method parallel (paralleltest)
func TestAddSecretIngredient(t *testing.T) {
^
lasagna_master_test.go:150:2: Range statement for test TestAddSecretIngredient missing the call to method parallel in test Run (paralleltest)
for _, tt := range tests {
^
lasagna_master_test.go:174:1: Function TestScaleRecipe missing the call to method parallel (paralleltest)
func TestScaleRecipe(t *testing.T) {
^
lasagna_master_test.go:201:2: Range statement for test TestScaleRecipe missing the call to method parallel in test Run (paralleltest)
for _, tt := range tests {
^
lasagna_master_examples_test.go:1:9: package should be `lasagna_test` instead of `lasagna` (testpackage)
package lasagna
^
lasagna_master_test.go:1:9: package should be `lasagna_test` instead of `lasagna` (testpackage)
package lasagna
^
real 0m0.604s
user 0m0.787s
sys 0m0.496s
==============================================================================
Exit code: -1
real 0m0.640s
user 0m0.800s
sys 0m0.532s
real 0m0.642s
user 0m0.800s
sys 0m0.533s
===============================================================================
Running: ../../.github/citools/go/go-lint-revive
Running Go Lint Revive
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.012s
user 0m0.005s
sys 0m0.010s
==============================================================================
Running: revive -formatter=stylish ./...
lasagna_master.go
(1, 1) https://revive.run/r#package-comments should have a package comment
✖ 1 problem (0 errors) (1 warnings)
real 0m0.069s
user 0m0.043s
sys 0m0.042s
==============================================================================
Exit code: 0
real 0m0.092s
user 0m0.051s
sys 0m0.065s
real 0m0.095s
user 0m0.053s
sys 0m0.066s
===============================================================================
Running: ../../.github/citools/go/go-lint-ineffassign
../run-tests: line 41: .github/citools/go/go-lint-ineffassign: No such file or directory
real 0m0.001s
user 0m0.000s
sys 0m0.000s
===============================================================================
Running: ../../.github/citools/go/go-lint-go-consistent
Running Go go-consistent
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.012s
user 0m0.006s
sys 0m0.009s
==============================================================================
Running: go-consistent -v ./...
info: check "./."
internal error: package "fmt" without types was imported from "lasagna [lasagna.test]"
real 0m0.090s
user 0m0.120s
sys 0m0.108s
==============================================================================
Exit code: -1
real 0m0.112s
user 0m0.129s
sys 0m0.128s
real 0m0.115s
user 0m0.132s
sys 0m0.128s
===============================================================================
Running: ../../.github/citools/go/go-lint-staticcheck
Running Go StaticCheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.018s
user 0m0.009s
sys 0m0.013s
==============================================================================
Running: staticcheck -checks=all ./...
lasagna_master.go:1:1: at least one file in a package should have a package comment (ST1000)
real 0m0.180s
user 0m0.214s
sys 0m0.135s
==============================================================================
Exit code: -1
real 0m0.214s
user 0m0.236s
sys 0m0.158s
real 0m0.216s
user 0m0.236s
sys 0m0.159s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocritic
Running Go gocritic
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.019s
user 0m0.009s
sys 0m0.015s
==============================================================================
Running: gocritic check -enableAll ./...
./lasagna_master.go:32:1: paramTypeCombine: func(friendList []string, myList []string) could be replaced with func(friendList, myList []string)
./lasagna_master.go:15:1: unnamedResult: consider giving a name to these results
real 0m0.820s
user 0m2.002s
sys 0m0.322s
==============================================================================
Exit code: -1
real 0m0.853s
user 0m2.017s
sys 0m0.350s
real 0m0.856s
user 0m2.018s
sys 0m0.351s
===============================================================================
Running: ../../.github/citools/go/go-lint-go_vet
Running Go Vet
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.012s
user 0m0.006s
sys 0m0.009s
==============================================================================
Running: go vet ./...
real 0m0.088s
user 0m0.135s
sys 0m0.112s
==============================================================================
Exit code: 0
real 0m0.109s
user 0m0.146s
sys 0m0.131s
real 0m0.111s
user 0m0.147s
sys 0m0.132s
===============================================================================
Running: ../../.github/citools/go/go-fixer-go_fix
Running go fix
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.011s
user 0m0.007s
sys 0m0.006s
==============================================================================
Running: go fix ./...
real 0m0.016s
user 0m0.011s
sys 0m0.008s
==============================================================================
Exit code: 0
real 0m0.038s
user 0m0.022s
sys 0m0.026s
real 0m0.040s
user 0m0.022s
sys 0m0.028s
===============================================================================
Running: ../../.github/citools/go/go-lint-errcheck
Running Go errcheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.020s
user 0m0.011s
sys 0m0.015s
==============================================================================
Running: errcheck ./...
real 0m0.464s
user 0m1.233s
sys 0m0.281s
==============================================================================
Exit code: 0
real 0m0.498s
user 0m1.254s
sys 0m0.307s
real 0m0.500s
user 0m1.255s
sys 0m0.308s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocyclo
Running Go gocyclo
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.014s
user 0m0.004s
sys 0m0.013s
==============================================================================
Running: gocyclo .
6 lasagna TestScaleRecipe lasagna_master_test.go:174:1
6 lasagna ScaleRecipe lasagna_master.go:42:1
4 lasagna TestAddSecretIngredient lasagna_master_test.go:141:1
4 lasagna TestQuantities lasagna_master_test.go:72:1
4 lasagna Quantities lasagna_master.go:15:1
3 lasagna TestPreparationTime lasagna_master_test.go:15:1
2 lasagna AddSecretIngredient lasagna_master.go:32:1
2 lasagna PreparationTime lasagna_master.go:5:1
1 lasagna ExampleScaleRecipe lasagna_master_examples_test.go:36:1
1 lasagna ExampleAddSecretIngredient lasagna_master_examples_test.go:26:1
1 lasagna ExampleQuantities lasagna_master_examples_test.go:17:1
1 lasagna ExamplePreparationTime lasagna_master_examples_test.go:7:1
real 0m0.003s
user 0m0.003s
sys 0m0.000s
==============================================================================
Exit code: 0
real 0m0.027s
user 0m0.014s
sys 0m0.021s
real 0m0.029s
user 0m0.016s
sys 0m0.021s
===============================================================================
Running: ../../.github/citools/go/go-lint-misspell
Running Go misspell
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: misspell .
real 0m0.035s
user 0m0.039s
sys 0m0.017s
==============================================================================
Exit code: 0
real 0m0.050s
user 0m0.046s
sys 0m0.032s
real 0m0.052s
user 0m0.047s
sys 0m0.033s
===============================================================================
Running: ../../.github/citools/go/go-lint-gosec
Running Go GoSec
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.018s
user 0m0.008s
sys 0m0.016s
==============================================================================
Running: gosec ./...
[gosec] 2023/09/07 00:24:27 Including rules: default
[gosec] 2023/09/07 00:24:27 Excluding rules: default
[gosec] 2023/09/07 00:24:27 Import directory: /home/vpayno/git_vpayno/exercism-workspace/go/lasagna-master
[gosec] 2023/09/07 00:24:27 Checking package: lasagna
[gosec] 2023/09/07 00:24:27 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/lasagna-master/lasagna_master.go
Results:
[1;36mSummary:[0m
Gosec : dev
Files : 1
Lines : 63
Nosec : 0
Issues : [1;32m0[0m
real 0m0.074s
user 0m0.065s
sys 0m0.047s
==============================================================================
Exit code: 0
real 0m0.110s
user 0m0.078s
sys 0m0.083s
real 0m0.112s
user 0m0.080s
sys 0m0.084s
===============================================================================
Running: ../../.github/citools/go/go-test-cover-report
Running Go Test, Coverage & Reports
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.014s
user 0m0.003s
sys 0m0.014s
==============================================================================
Running: gotest -v -covermode=count -coverprofile coverage.out ./...
=== RUN TestPreparationTime
=== RUN TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time
=== RUN TestPreparationTime/Preparation_time_for_few_layers
=== RUN TestPreparationTime/Preparation_time_for_default_case
--- PASS: TestPreparationTime (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_few_layers (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_default_case (0.00s)
=== RUN TestQuantities
=== RUN TestQuantities/few_layers
=== RUN TestQuantities/many_layers
=== RUN TestQuantities/no_noodles
=== RUN TestQuantities/no_sauce
--- PASS: TestQuantities (0.00s)
--- PASS: TestQuantities/few_layers (0.00s)
--- PASS: TestQuantities/many_layers (0.00s)
--- PASS: TestQuantities/no_noodles (0.00s)
--- PASS: TestQuantities/no_sauce (0.00s)
=== RUN TestAddSecretIngredient
=== RUN TestAddSecretIngredient/Adds_secret_ingredient
--- PASS: TestAddSecretIngredient (0.00s)
--- PASS: TestAddSecretIngredient/Adds_secret_ingredient (0.00s)
=== RUN TestScaleRecipe
=== RUN TestScaleRecipe/scales_up_correctly
=== RUN TestScaleRecipe/scales_up_correctly_(2)
=== RUN TestScaleRecipe/scales_down_correctly
=== RUN TestScaleRecipe/empty_recipe
--- PASS: TestScaleRecipe (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly_(2) (0.00s)
--- PASS: TestScaleRecipe/scales_down_correctly (0.00s)
--- PASS: TestScaleRecipe/empty_recipe (0.00s)
=== RUN ExamplePreparationTime
--- PASS: ExamplePreparationTime (0.00s)
=== RUN ExampleQuantities
--- PASS: ExampleQuantities (0.00s)
=== RUN ExampleAddSecretIngredient
--- PASS: ExampleAddSecretIngredient (0.00s)
=== RUN ExampleScaleRecipe
--- PASS: ExampleScaleRecipe (0.00s)
PASS
coverage: 95.8% of statements
ok lasagna 0.012s coverage: 95.8% of statements
real 0m0.212s
user 0m0.280s
sys 0m0.195s
==============================================================================
Running: go tool cover -func=coverage.out
lasagna/lasagna_master.go:5: PreparationTime 100.0%
lasagna/lasagna_master.go:15: Quantities 100.0%
lasagna/lasagna_master.go:32: AddSecretIngredient 66.7%
lasagna/lasagna_master.go:42: ScaleRecipe 100.0%
total: (statements) 95.8%
real 0m0.022s
user 0m0.012s
sys 0m0.016s
==============================================================================
Running: go tool cover -html coverage.out -o coverage.html
real 0m0.022s
user 0m0.012s
sys 0m0.014s
==============================================================================
Running: cover_annotate
Running: gocov convert coverage.out | gocov annotate -ceiling=100 - | tee coverage-annotations.txt
32 func AddSecretIngredient(friendList []string, myList []string) {
33 if myList[len(myList)-1] == "?" {
34 myList[len(myList)-1] = friendList[len(friendList)-1]
35 } else {
36 MISS panic("You already know the secret ingredient!")
37 }
38 }
real 0m0.010s
user 0m0.005s
sys 0m0.010s
real 0m0.010s
user 0m0.005s
sys 0m0.010s
==============================================================================
Running: gotest -v -race -covermode=atomic ./...
=== RUN TestPreparationTime
=== RUN TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time
=== RUN TestPreparationTime/Preparation_time_for_few_layers
=== RUN TestPreparationTime/Preparation_time_for_default_case
--- PASS: TestPreparationTime (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_few_layers (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_default_case (0.00s)
=== RUN TestQuantities
=== RUN TestQuantities/few_layers
=== RUN TestQuantities/many_layers
=== RUN TestQuantities/no_noodles
=== RUN TestQuantities/no_sauce
--- PASS: TestQuantities (0.00s)
--- PASS: TestQuantities/few_layers (0.00s)
--- PASS: TestQuantities/many_layers (0.00s)
--- PASS: TestQuantities/no_noodles (0.00s)
--- PASS: TestQuantities/no_sauce (0.00s)
=== RUN TestAddSecretIngredient
=== RUN TestAddSecretIngredient/Adds_secret_ingredient
--- PASS: TestAddSecretIngredient (0.00s)
--- PASS: TestAddSecretIngredient/Adds_secret_ingredient (0.00s)
=== RUN TestScaleRecipe
=== RUN TestScaleRecipe/scales_up_correctly
=== RUN TestScaleRecipe/scales_up_correctly_(2)
=== RUN TestScaleRecipe/scales_down_correctly
=== RUN TestScaleRecipe/empty_recipe
--- PASS: TestScaleRecipe (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly_(2) (0.00s)
--- PASS: TestScaleRecipe/scales_down_correctly (0.00s)
--- PASS: TestScaleRecipe/empty_recipe (0.00s)
=== RUN ExamplePreparationTime
--- PASS: ExamplePreparationTime (0.00s)
=== RUN ExampleQuantities
--- PASS: ExampleQuantities (0.00s)
=== RUN ExampleAddSecretIngredient
--- PASS: ExampleAddSecretIngredient (0.00s)
=== RUN ExampleScaleRecipe
--- PASS: ExampleScaleRecipe (0.00s)
PASS
coverage: 95.8% of statements
ok lasagna 1.016s coverage: 95.8% of statements
real 0m1.251s
user 0m0.303s
sys 0m0.175s
==============================================================================
Exit code: 0
real 0m1.545s
user 0m0.626s
sys 0m0.432s
real 0m1.547s
user 0m0.627s
sys 0m0.433s
===============================================================================
gotest -v --run=xxx --bench . --benchmem |& tee benchstat-new.txt
PASS
ok lasagna 0.002s
real 0m0.173s
user 0m0.251s
sys 0m0.178s
===============================================================================
gotest -v -tags bonus
=== RUN TestPreparationTime
=== RUN TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time
=== RUN TestPreparationTime/Preparation_time_for_few_layers
=== RUN TestPreparationTime/Preparation_time_for_default_case
--- PASS: TestPreparationTime (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_many_layers_with_custom_average_time (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_few_layers (0.00s)
--- PASS: TestPreparationTime/Preparation_time_for_default_case (0.00s)
=== RUN TestQuantities
=== RUN TestQuantities/few_layers
=== RUN TestQuantities/many_layers
=== RUN TestQuantities/no_noodles
=== RUN TestQuantities/no_sauce
--- PASS: TestQuantities (0.00s)
--- PASS: TestQuantities/few_layers (0.00s)
--- PASS: TestQuantities/many_layers (0.00s)
--- PASS: TestQuantities/no_noodles (0.00s)
--- PASS: TestQuantities/no_sauce (0.00s)
=== RUN TestAddSecretIngredient
=== RUN TestAddSecretIngredient/Adds_secret_ingredient
--- PASS: TestAddSecretIngredient (0.00s)
--- PASS: TestAddSecretIngredient/Adds_secret_ingredient (0.00s)
=== RUN TestScaleRecipe
=== RUN TestScaleRecipe/scales_up_correctly
=== RUN TestScaleRecipe/scales_up_correctly_(2)
=== RUN TestScaleRecipe/scales_down_correctly
=== RUN TestScaleRecipe/empty_recipe
--- PASS: TestScaleRecipe (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly (0.00s)
--- PASS: TestScaleRecipe/scales_up_correctly_(2) (0.00s)
--- PASS: TestScaleRecipe/scales_down_correctly (0.00s)
--- PASS: TestScaleRecipe/empty_recipe (0.00s)
=== RUN ExamplePreparationTime
--- PASS: ExamplePreparationTime (0.00s)
=== RUN ExampleQuantities
--- PASS: ExampleQuantities (0.00s)
=== RUN ExampleAddSecretIngredient
--- PASS: ExampleAddSecretIngredient (0.00s)
=== RUN ExampleScaleRecipe
--- PASS: ExampleScaleRecipe (0.00s)
PASS
ok lasagna 0.002s
real 0m0.123s
user 0m0.184s
sys 0m0.106s
===============================================================================
No old benchmarks to run benchstat against.
===============================================================================
gomarkdoc --output lasagna-doc.md
real 0m0.011s
user 0m0.008s
sys 0m0.003s
===============================================================================
go doc -all lasagna
package lasagna // import "lasagna"
FUNCTIONS
func AddSecretIngredient(friendList []string, myList []string)
AddSecretIngredient passes `MyList` by reference. Accepts two slices of
ingredients of type `[]string`.
func PreparationTime(layers []string, avgPrepTime int) int
PreparationTime returns the estimate for the total preparation time based on
the number of layers as an `int`. Accepts a slice of layers as a `[]string`
and the average preparation time per layer in minutes as an `int`.
func Quantities(layers []string) (int, float64)
Quantities returns two values of noodles as an `int` and sauce as a
`float64`. Accepts a slice of layers as parameter as a `[]string`.
func ScaleRecipe(quantities []float64, portions int) []float64
ScaleRecipe returns a slice of `float64` of the amounts needed for the
desired number of portions. Accepts a slice of `float64` amounts needed for
2 portions and the number of portions, `int`, you want to cook.
real 0m0.027s
user 0m0.009s
sys 0m0.025s
===============================================================================