influxdb/models
Cuong Manh Le 51ff6f7b5c
fix: misuse of reflect.SliceHeader (#19875)
Currently, unsafeBytesToString function violates the 6th rule of unsafe
pointer usage. That is, reflect.SliceHeader/String header should never
be used as plain struct. This misuse can make to silent memory
corruption, which can be difficult to track down when problem occurred.

Instead, use the more (right) idiom to convert slice of byte to string
without heap allocation.

goos: linux
goarch: amd64
cpu: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
BenchmarkInvalid-8   	1000000000	         0.497 ns/op	       0 B/op	       0 allocs/op
BenchmarkValid-8     	1000000000	         0.239 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	command-line-arguments	0.815s
2020-11-09 09:37:20 -05:00
..
consistency.go refactor: move v2/v1/models to v2/models 2020-08-03 09:20:51 -07:00
fieldtype_string.go refactor: move v2/v1/models to v2/models 2020-08-03 09:20:51 -07:00
gen.go refactor: move v2/v1/models to v2/models 2020-08-03 09:20:51 -07:00
inline_fnv.go chore: rename imports from platform to influxdb 2019-01-09 20:51:47 -08:00
inline_fnv_test.go refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
inline_strconv_parse.go fix: misuse of reflect.SliceHeader (#19875) 2020-11-09 09:37:20 -05:00
inline_strconv_parse_test.go Initial import of models package 2018-10-01 12:03:19 +01:00
points.go fix(models): correctly parse float as 64-bits (#19870) 2020-10-30 11:27:37 -07:00
points_internal_test.go refactor: move v2/v1/models to v2/models 2020-08-03 09:20:51 -07:00
points_test.go refactor: move v2/v1/models to v2/models 2020-08-03 09:20:51 -07:00
rows.go Initial import of models package 2018-10-01 12:03:19 +01:00
statistic.go Initial import of models package 2018-10-01 12:03:19 +01:00
statistic_test.go refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
tagkeysset.go feat(storage): TagKeysSet is a set of tag keys derived from models.Tags 2019-04-24 11:14:21 -07:00
tagkeysset_test.go refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
time.go Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00