File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 go tool cover -html=coverage.out -o=coveragereport.html.out
4545
4646 - name : Publish code coverage badge (and optional report)
47- uses : linkdata/gitcoverage@v1
47+ uses : linkdata/gitcoverage@v3
4848 with :
4949 coverage : ${{ steps.coverage.outputs.coverage }}
5050 report : " coveragereport.html.out"
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import (
77
88type Value float32
99
10+ func (v Value ) String () string {
11+ return fmt .Sprint (v )
12+ }
13+
1014func (v Value ) Format (f fmt.State , verb rune ) {
1115 var wid , prec int
1216 var scale rune
Original file line number Diff line number Diff line change @@ -83,3 +83,11 @@ func TestValue_Format(t *testing.T) {
8383 })
8484 }
8585}
86+
87+ func TestValue_String (t * testing.T ) {
88+ want := "1.95kB"
89+ got := N (2000 ).String ()
90+ if got != want {
91+ t .Errorf ("want %q got %q" , want , got )
92+ }
93+ }
You can’t perform that action at this time.
0 commit comments