Skip to content

Commit

Permalink
fix(datasources): Fix aws+sm bug when reading secrets not starting wi…
Browse files Browse the repository at this point in the history
…th slash (#2284)

Signed-off-by: Dave Henderson <[email protected]>
  • Loading branch information
hairyhenderson authored Dec 16, 2024
1 parent 66fd58b commit a69bb64
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions internal/datafs/fsurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ func SplitFSMuxURL(in *url.URL) (*url.URL, string) {
}

return &u, base
case "aws+sm":
// An aws+sm URL can either be opaque or have a path with a leading
// slash. If it's opaque, the URL must not contain a leading slash. If
// it has a path, the URL must begin with a slash.
if u.Opaque != "" {
return &url.URL{Scheme: u.Scheme}, u.Opaque
} else {
return &url.URL{Scheme: u.Scheme, Path: "/"}, strings.TrimLeft(u.Path, "/")
}
}

// trim leading and trailing slashes - they are not part of a valid path
Expand Down
20 changes: 20 additions & 0 deletions internal/datafs/fsurl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ func TestSplitFSMuxURL(t *testing.T) {
"merge:///",
"vault:///foo/bar|foo|git+ssh://[email protected]/hairyhenderson/go-which.git//a/b/c/d",
},
{
"aws+sm:foo",
"aws+sm:",
"foo",
},
{
"aws+sm:foo/bar",
"aws+sm:",
"foo/bar",
},
{
"aws+sm:/foo/bar",
"aws+sm:///",
"foo/bar",
},
{
"aws+sm:/foo",
"aws+sm:///",
"foo",
},
}

for _, d := range testdata {
Expand Down
2 changes: 2 additions & 0 deletions internal/datafs/fsys.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ func FSysForPath(ctx context.Context, path string) (fs.FS, error) {
switch u.Scheme {
case "git+http", "git+https", "git+ssh", "git":
// no-op, these are handled
case "aws+sm":
// An aws+sm URL can be opaque, best not disturb it
case "", "file", "git+file":
// default to "/" so we have a rooted filesystem for all schemes, but also
// support volumes on Windows
Expand Down
4 changes: 2 additions & 2 deletions internal/datafs/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ func (d *dsReader) readFileContent(ctx context.Context, u *url.URL, hdr http.Hea
// leaking into the filesystem layer
u = removeQueryParam(u, overrideType)

u, fname := SplitFSMuxURL(u)

fsys, err := FSysForPath(ctx, u.String())
if err != nil {
return nil, fmt.Errorf("fsys for path %v: %w", u, err)
}

u, fname := SplitFSMuxURL(u)

// need to support absolute paths on local filesystem too
// TODO: this is a hack, probably fix this?
if u.Scheme == "file" && runtime.GOOS != "windows" {
Expand Down

1 comment on commit a69bb64

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: a69bb64 Previous: 66fd58b Ratio
BenchmarkFlatten/depth-1_[]int([1_2_3]) 167.7 ns/op 168 B/op 5 allocs/op 165.7 ns/op 168 B/op 5 allocs/op 1.01
BenchmarkFlatten/depth-1_[]int([1_2_3]) - ns/op 167.7 ns/op 165.7 ns/op 1.01
BenchmarkFlatten/depth-1_[]int([1_2_3]) - B/op 168 B/op 168 B/op 1
BenchmarkFlatten/depth-1_[]int([1_2_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth-1_[3]int([1_2_3]) 118 ns/op 144 B/op 2 allocs/op 117.2 ns/op 144 B/op 2 allocs/op 1.01
BenchmarkFlatten/depth-1_[3]int([1_2_3]) - ns/op 118 ns/op 117.2 ns/op 1.01
BenchmarkFlatten/depth-1_[3]int([1_2_3]) - B/op 144 B/op 144 B/op 1
BenchmarkFlatten/depth-1_[3]int([1_2_3]) - allocs/op 2 allocs/op 2 allocs/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[]_[1_2]_3]) 203.9 ns/op 208 B/op 5 allocs/op 203.4 ns/op 208 B/op 5 allocs/op 1.00
BenchmarkFlatten/depth-1_[]interface_{}([[]_[1_2]_3]) - ns/op 203.9 ns/op 203.4 ns/op 1.00
BenchmarkFlatten/depth-1_[]interface_{}([[]_[1_2]_3]) - B/op 208 B/op 208 B/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[]_[1_2]_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[1_2]]_3]) 449.8 ns/op 344 B/op 11 allocs/op 422.8 ns/op 344 B/op 11 allocs/op 1.06
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[1_2]]_3]) - ns/op 449.8 ns/op 422.8 ns/op 1.06
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[1_2]]_3]) - B/op 344 B/op 344 B/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[1_2]]_3]) - allocs/op 11 allocs/op 11 allocs/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) 806.7 ns/op 896 B/op 19 allocs/op 791.2 ns/op 896 B/op 19 allocs/op 1.02
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - ns/op 806.7 ns/op 791.2 ns/op 1.02
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - B/op 896 B/op 896 B/op 1
BenchmarkFlatten/depth-1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - allocs/op 19 allocs/op 19 allocs/op 1
BenchmarkFlatten/depth0_[]int([1_2_3]) 114.2 ns/op 72 B/op 4 allocs/op 114.2 ns/op 72 B/op 4 allocs/op 1
BenchmarkFlatten/depth0_[]int([1_2_3]) - ns/op 114.2 ns/op 114.2 ns/op 1
BenchmarkFlatten/depth0_[]int([1_2_3]) - B/op 72 B/op 72 B/op 1
BenchmarkFlatten/depth0_[]int([1_2_3]) - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkFlatten/depth0_[3]int([1_2_3]) 64.2 ns/op 48 B/op 1 allocs/op 63.74 ns/op 48 B/op 1 allocs/op 1.01
BenchmarkFlatten/depth0_[3]int([1_2_3]) - ns/op 64.2 ns/op 63.74 ns/op 1.01
BenchmarkFlatten/depth0_[3]int([1_2_3]) - B/op 48 B/op 48 B/op 1
BenchmarkFlatten/depth0_[3]int([1_2_3]) - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkFlatten/depth0_[]interface_{}([[]_[1_2]_3]) 4.313 ns/op 0 B/op 0 allocs/op 4.33 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkFlatten/depth0_[]interface_{}([[]_[1_2]_3]) - ns/op 4.313 ns/op 4.33 ns/op 1.00
BenchmarkFlatten/depth0_[]interface_{}([[]_[1_2]_3]) - B/op 0 B/op 0 B/op 1
BenchmarkFlatten/depth0_[]interface_{}([[]_[1_2]_3]) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[1_2]]_3]) 4.23 ns/op 0 B/op 0 allocs/op 4.442 ns/op 0 B/op 0 allocs/op 0.95
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[1_2]]_3]) - ns/op 4.23 ns/op 4.442 ns/op 0.95
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[1_2]]_3]) - B/op 0 B/op 0 B/op 1
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[1_2]]_3]) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) 4.233 ns/op 0 B/op 0 allocs/op 4.301 ns/op 0 B/op 0 allocs/op 0.98
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - ns/op 4.233 ns/op 4.301 ns/op 0.98
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - B/op 0 B/op 0 B/op 1
BenchmarkFlatten/depth0_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkFlatten/depth1_[]int([1_2_3]) 168 ns/op 168 B/op 5 allocs/op 166.1 ns/op 168 B/op 5 allocs/op 1.01
BenchmarkFlatten/depth1_[]int([1_2_3]) - ns/op 168 ns/op 166.1 ns/op 1.01
BenchmarkFlatten/depth1_[]int([1_2_3]) - B/op 168 B/op 168 B/op 1
BenchmarkFlatten/depth1_[]int([1_2_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth1_[3]int([1_2_3]) 117.9 ns/op 144 B/op 2 allocs/op 116.9 ns/op 144 B/op 2 allocs/op 1.01
BenchmarkFlatten/depth1_[3]int([1_2_3]) - ns/op 117.9 ns/op 116.9 ns/op 1.01
BenchmarkFlatten/depth1_[3]int([1_2_3]) - B/op 144 B/op 144 B/op 1
BenchmarkFlatten/depth1_[3]int([1_2_3]) - allocs/op 2 allocs/op 2 allocs/op 1
BenchmarkFlatten/depth1_[]interface_{}([[]_[1_2]_3]) 158.5 ns/op 144 B/op 4 allocs/op 157.9 ns/op 144 B/op 4 allocs/op 1.00
BenchmarkFlatten/depth1_[]interface_{}([[]_[1_2]_3]) - ns/op 158.5 ns/op 157.9 ns/op 1.00
BenchmarkFlatten/depth1_[]interface_{}([[]_[1_2]_3]) - B/op 144 B/op 144 B/op 1
BenchmarkFlatten/depth1_[]interface_{}([[]_[1_2]_3]) - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[1_2]]_3]) 212.4 ns/op 168 B/op 5 allocs/op 210.8 ns/op 168 B/op 5 allocs/op 1.01
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[1_2]]_3]) - ns/op 212.4 ns/op 210.8 ns/op 1.01
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[1_2]]_3]) - B/op 168 B/op 168 B/op 1
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[1_2]]_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) 142.3 ns/op 128 B/op 3 allocs/op 140.6 ns/op 128 B/op 3 allocs/op 1.01
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - ns/op 142.3 ns/op 140.6 ns/op 1.01
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - B/op 128 B/op 128 B/op 1
BenchmarkFlatten/depth1_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkFlatten/depth2_[]int([1_2_3]) 167.5 ns/op 168 B/op 5 allocs/op 166.3 ns/op 168 B/op 5 allocs/op 1.01
BenchmarkFlatten/depth2_[]int([1_2_3]) - ns/op 167.5 ns/op 166.3 ns/op 1.01
BenchmarkFlatten/depth2_[]int([1_2_3]) - B/op 168 B/op 168 B/op 1
BenchmarkFlatten/depth2_[]int([1_2_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth2_[3]int([1_2_3]) 119 ns/op 144 B/op 2 allocs/op 116.9 ns/op 144 B/op 2 allocs/op 1.02
BenchmarkFlatten/depth2_[3]int([1_2_3]) - ns/op 119 ns/op 116.9 ns/op 1.02
BenchmarkFlatten/depth2_[3]int([1_2_3]) - B/op 144 B/op 144 B/op 1
BenchmarkFlatten/depth2_[3]int([1_2_3]) - allocs/op 2 allocs/op 2 allocs/op 1
BenchmarkFlatten/depth2_[]interface_{}([[]_[1_2]_3]) 206.5 ns/op 208 B/op 5 allocs/op 203.9 ns/op 208 B/op 5 allocs/op 1.01
BenchmarkFlatten/depth2_[]interface_{}([[]_[1_2]_3]) - ns/op 206.5 ns/op 203.9 ns/op 1.01
BenchmarkFlatten/depth2_[]interface_{}([[]_[1_2]_3]) - B/op 208 B/op 208 B/op 1
BenchmarkFlatten/depth2_[]interface_{}([[]_[1_2]_3]) - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[1_2]]_3]) 376.4 ns/op 280 B/op 10 allocs/op 368.6 ns/op 280 B/op 10 allocs/op 1.02
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[1_2]]_3]) - ns/op 376.4 ns/op 368.6 ns/op 1.02
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[1_2]]_3]) - B/op 280 B/op 280 B/op 1
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[1_2]]_3]) - allocs/op 10 allocs/op 10 allocs/op 1
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) 319 ns/op 272 B/op 8 allocs/op 324.6 ns/op 272 B/op 8 allocs/op 0.98
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - ns/op 319 ns/op 324.6 ns/op 0.98
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - B/op 272 B/op 272 B/op 1
BenchmarkFlatten/depth2_[]interface_{}([[one]_[[[1]_[2_[3]]]_[4_5]]_6]) - allocs/op 8 allocs/op 8 allocs/op 1
BenchmarkInterfaceSlice/[]int([1_2_3]) 113.2 ns/op 72 B/op 4 allocs/op 112.6 ns/op 72 B/op 4 allocs/op 1.01
BenchmarkInterfaceSlice/[]int([1_2_3]) - ns/op 113.2 ns/op 112.6 ns/op 1.01
BenchmarkInterfaceSlice/[]int([1_2_3]) - B/op 72 B/op 72 B/op 1
BenchmarkInterfaceSlice/[]int([1_2_3]) - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkInterfaceSlice/[3]int([1_2_3]) 60.49 ns/op 48 B/op 1 allocs/op 60.15 ns/op 48 B/op 1 allocs/op 1.01
BenchmarkInterfaceSlice/[3]int([1_2_3]) - ns/op 60.49 ns/op 60.15 ns/op 1.01
BenchmarkInterfaceSlice/[3]int([1_2_3]) - B/op 48 B/op 48 B/op 1
BenchmarkInterfaceSlice/[3]int([1_2_3]) - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkInterfaceSlice/[]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) 549.7 ns/op 384 B/op 13 allocs/op 536.3 ns/op 384 B/op 13 allocs/op 1.02
BenchmarkInterfaceSlice/[]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - ns/op 549.7 ns/op 536.3 ns/op 1.02
BenchmarkInterfaceSlice/[]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - B/op 384 B/op 384 B/op 1
BenchmarkInterfaceSlice/[]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - allocs/op 13 allocs/op 13 allocs/op 1
BenchmarkInterfaceSlice/[12]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) 152.6 ns/op 192 B/op 1 allocs/op 152.9 ns/op 192 B/op 1 allocs/op 1.00
BenchmarkInterfaceSlice/[12]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - ns/op 152.6 ns/op 152.9 ns/op 1.00
BenchmarkInterfaceSlice/[12]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - B/op 192 B/op 192 B/op 1
BenchmarkInterfaceSlice/[12]string([foo_bar_baz_foo_bar_baz_foo_bar_baz_foo_bar_baz]) - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkInterfaceSlice/[]interface_{}([[]_[1_2]_3]) 2.209 ns/op 0 B/op 0 allocs/op 2.202 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkInterfaceSlice/[]interface_{}([[]_[1_2]_3]) - ns/op 2.209 ns/op 2.202 ns/op 1.00
BenchmarkInterfaceSlice/[]interface_{}([[]_[1_2]_3]) - B/op 0 B/op 0 B/op 1
BenchmarkInterfaceSlice/[]interface_{}([[]_[1_2]_3]) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkInterfaceSlice/[3]interface_{}([[]_[1_2]_3]) 63.51 ns/op 48 B/op 1 allocs/op 63.17 ns/op 48 B/op 1 allocs/op 1.01
BenchmarkInterfaceSlice/[3]interface_{}([[]_[1_2]_3]) - ns/op 63.51 ns/op 63.17 ns/op 1.01
BenchmarkInterfaceSlice/[3]interface_{}([[]_[1_2]_3]) - B/op 48 B/op 48 B/op 1
BenchmarkInterfaceSlice/[3]interface_{}([[]_[1_2]_3]) - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkToBytes 1055 ns/op 40 B/op 3 allocs/op 1125 ns/op 40 B/op 3 allocs/op 0.94
BenchmarkToBytes - ns/op 1055 ns/op 1125 ns/op 0.94
BenchmarkToBytes - B/op 40 B/op 40 B/op 1
BenchmarkToBytes - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/int(0) 3.107 ns/op 0 B/op 0 allocs/op 3.178 ns/op 0 B/op 0 allocs/op 0.98
BenchmarkIsFloat/int(0) - ns/op 3.107 ns/op 3.178 ns/op 0.98
BenchmarkIsFloat/int(0) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int(0) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int(1) 3.103 ns/op 0 B/op 0 allocs/op 3.102 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/int(1) - ns/op 3.103 ns/op 3.102 ns/op 1.00
BenchmarkIsFloat/int(1) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int(1) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int(-1) 3.102 ns/op 0 B/op 0 allocs/op 3.135 ns/op 0 B/op 0 allocs/op 0.99
BenchmarkIsFloat/int(-1) - ns/op 3.102 ns/op 3.135 ns/op 0.99
BenchmarkIsFloat/int(-1) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int(-1) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/uint(42) 3.096 ns/op 0 B/op 0 allocs/op 3.097 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/uint(42) - ns/op 3.096 ns/op 3.097 ns/op 1.00
BenchmarkIsFloat/uint(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/uint(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/uint8(255) 3.096 ns/op 0 B/op 0 allocs/op 3.097 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/uint8(255) - ns/op 3.096 ns/op 3.097 ns/op 1.00
BenchmarkIsFloat/uint8(255) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/uint8(255) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/uint16(42) 3.096 ns/op 0 B/op 0 allocs/op 3.102 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/uint16(42) - ns/op 3.096 ns/op 3.102 ns/op 1.00
BenchmarkIsFloat/uint16(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/uint16(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/uint32(42) 3.097 ns/op 0 B/op 0 allocs/op 3.096 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/uint32(42) - ns/op 3.097 ns/op 3.096 ns/op 1.00
BenchmarkIsFloat/uint32(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/uint32(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/uint64(42) 3.095 ns/op 0 B/op 0 allocs/op 3.101 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/uint64(42) - ns/op 3.095 ns/op 3.101 ns/op 1.00
BenchmarkIsFloat/uint64(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/uint64(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int(42) 3.101 ns/op 0 B/op 0 allocs/op 3.101 ns/op 0 B/op 0 allocs/op 1
BenchmarkIsFloat/int(42) - ns/op 3.101 ns/op 3.101 ns/op 1
BenchmarkIsFloat/int(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int8(127) 3.099 ns/op 0 B/op 0 allocs/op 3.096 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/int8(127) - ns/op 3.099 ns/op 3.096 ns/op 1.00
BenchmarkIsFloat/int8(127) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int8(127) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int16(42) 3.098 ns/op 0 B/op 0 allocs/op 3.102 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/int16(42) - ns/op 3.098 ns/op 3.102 ns/op 1.00
BenchmarkIsFloat/int16(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int16(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int32(42) 3.1 ns/op 0 B/op 0 allocs/op 3.094 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/int32(42) - ns/op 3.1 ns/op 3.094 ns/op 1.00
BenchmarkIsFloat/int32(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int32(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/int64(42) 3.1 ns/op 0 B/op 0 allocs/op 3.1 ns/op 0 B/op 0 allocs/op 1
BenchmarkIsFloat/int64(42) - ns/op 3.1 ns/op 3.1 ns/op 1
BenchmarkIsFloat/int64(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/int64(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/float32(18.3) 2.479 ns/op 0 B/op 0 allocs/op 2.786 ns/op 0 B/op 0 allocs/op 0.89
BenchmarkIsFloat/float32(18.3) - ns/op 2.479 ns/op 2.786 ns/op 0.89
BenchmarkIsFloat/float32(18.3) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/float32(18.3) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/float64(18.3) 2.794 ns/op 0 B/op 0 allocs/op 2.792 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/float64(18.3) - ns/op 2.794 ns/op 2.792 ns/op 1.00
BenchmarkIsFloat/float64(18.3) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/float64(18.3) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/float64(1.5) 2.786 ns/op 0 B/op 0 allocs/op 2.786 ns/op 0 B/op 0 allocs/op 1
BenchmarkIsFloat/float64(1.5) - ns/op 2.786 ns/op 2.786 ns/op 1
BenchmarkIsFloat/float64(1.5) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/float64(1.5) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/float64(-18.6) 2.787 ns/op 0 B/op 0 allocs/op 2.789 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/float64(-18.6) - ns/op 2.787 ns/op 2.789 ns/op 1.00
BenchmarkIsFloat/float64(-18.6) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/float64(-18.6) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/string(42) 33.81 ns/op 0 B/op 0 allocs/op 34.1 ns/op 0 B/op 0 allocs/op 0.99
BenchmarkIsFloat/string(42) - ns/op 33.81 ns/op 34.1 ns/op 0.99
BenchmarkIsFloat/string(42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/string(42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/string(052) 38.13 ns/op 0 B/op 0 allocs/op 38.08 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/string(052) - ns/op 38.13 ns/op 38.08 ns/op 1.00
BenchmarkIsFloat/string(052) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/string(052) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/string(0xff) 72.32 ns/op 52 B/op 2 allocs/op 72.28 ns/op 52 B/op 2 allocs/op 1.00
BenchmarkIsFloat/string(0xff) - ns/op 72.32 ns/op 72.28 ns/op 1.00
BenchmarkIsFloat/string(0xff) - B/op 52 B/op 52 B/op 1
BenchmarkIsFloat/string(0xff) - allocs/op 2 allocs/op 2 allocs/op 1
BenchmarkIsFloat/string(-42) 35.75 ns/op 0 B/op 0 allocs/op 35.95 ns/op 0 B/op 0 allocs/op 0.99
BenchmarkIsFloat/string(-42) - ns/op 35.75 ns/op 35.95 ns/op 0.99
BenchmarkIsFloat/string(-42) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/string(-42) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/string(-0) 32.56 ns/op 0 B/op 0 allocs/op 32.63 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/string(-0) - ns/op 32.56 ns/op 32.63 ns/op 1.00
BenchmarkIsFloat/string(-0) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/string(-0) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkIsFloat/string(3.14) 105 ns/op 56 B/op 3 allocs/op 105.3 ns/op 56 B/op 3 allocs/op 1.00
BenchmarkIsFloat/string(3.14) - ns/op 105 ns/op 105.3 ns/op 1.00
BenchmarkIsFloat/string(3.14) - B/op 56 B/op 56 B/op 1
BenchmarkIsFloat/string(3.14) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string(-3.14) 114.4 ns/op 64 B/op 3 allocs/op 112.2 ns/op 64 B/op 3 allocs/op 1.02
BenchmarkIsFloat/string(-3.14) - ns/op 114.4 ns/op 112.2 ns/op 1.02
BenchmarkIsFloat/string(-3.14) - B/op 64 B/op 64 B/op 1
BenchmarkIsFloat/string(-3.14) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string(0.00) 105.9 ns/op 56 B/op 3 allocs/op 105.8 ns/op 56 B/op 3 allocs/op 1.00
BenchmarkIsFloat/string(0.00) - ns/op 105.9 ns/op 105.8 ns/op 1.00
BenchmarkIsFloat/string(0.00) - B/op 56 B/op 56 B/op 1
BenchmarkIsFloat/string(0.00) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string(NaN) 92.58 ns/op 54 B/op 3 allocs/op 93.86 ns/op 54 B/op 3 allocs/op 0.99
BenchmarkIsFloat/string(NaN) - ns/op 92.58 ns/op 93.86 ns/op 0.99
BenchmarkIsFloat/string(NaN) - B/op 54 B/op 54 B/op 1
BenchmarkIsFloat/string(NaN) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string(-Inf) 91.22 ns/op 56 B/op 3 allocs/op 92.49 ns/op 56 B/op 3 allocs/op 0.99
BenchmarkIsFloat/string(-Inf) - ns/op 91.22 ns/op 92.49 ns/op 0.99
BenchmarkIsFloat/string(-Inf) - B/op 56 B/op 56 B/op 1
BenchmarkIsFloat/string(-Inf) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string(+Inf) 91.41 ns/op 56 B/op 3 allocs/op 93.17 ns/op 56 B/op 3 allocs/op 0.98
BenchmarkIsFloat/string(+Inf) - ns/op 91.41 ns/op 93.17 ns/op 0.98
BenchmarkIsFloat/string(+Inf) - B/op 56 B/op 56 B/op 1
BenchmarkIsFloat/string(+Inf) - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkIsFloat/string() 49.85 ns/op 48 B/op 1 allocs/op 49.84 ns/op 48 B/op 1 allocs/op 1.00
BenchmarkIsFloat/string() - ns/op 49.85 ns/op 49.84 ns/op 1.00
BenchmarkIsFloat/string() - B/op 48 B/op 48 B/op 1
BenchmarkIsFloat/string() - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkIsFloat/string(foo) 69.67 ns/op 51 B/op 2 allocs/op 69.53 ns/op 51 B/op 2 allocs/op 1.00
BenchmarkIsFloat/string(foo) - ns/op 69.67 ns/op 69.53 ns/op 1.00
BenchmarkIsFloat/string(foo) - B/op 51 B/op 51 B/op 1
BenchmarkIsFloat/string(foo) - allocs/op 2 allocs/op 2 allocs/op 1
BenchmarkIsFloat/bool(true) 3.098 ns/op 0 B/op 0 allocs/op 3.097 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkIsFloat/bool(true) - ns/op 3.098 ns/op 3.097 ns/op 1.00
BenchmarkIsFloat/bool(true) - B/op 0 B/op 0 B/op 1
BenchmarkIsFloat/bool(true) - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkLookupIPs 49949 ns/op 1840 B/op 44 allocs/op 50737 ns/op 1840 B/op 44 allocs/op 0.98
BenchmarkLookupIPs - ns/op 49949 ns/op 50737 ns/op 0.98
BenchmarkLookupIPs - B/op 1840 B/op 1840 B/op 1
BenchmarkLookupIPs - allocs/op 44 allocs/op 44 allocs/op 1
BenchmarkIndent 2072 ns/op 2064 B/op 20 allocs/op 1946 ns/op 2064 B/op 20 allocs/op 1.06
BenchmarkIndent - ns/op 2072 ns/op 1946 ns/op 1.06
BenchmarkIndent - B/op 2064 B/op 2064 B/op 1
BenchmarkIndent - allocs/op 20 allocs/op 20 allocs/op 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.