Skip to content

Commit

Permalink
Merge pull request #14 from go-faster/refactor/unsafe-tags
Browse files Browse the repository at this point in the history
refactor: update unsafe build tags
  • Loading branch information
ernado authored Jan 3, 2022
2 parents e17c670 + 832eb1e commit d428956
Show file tree
Hide file tree
Showing 82 changed files with 55 additions and 217 deletions.
6 changes: 0 additions & 6 deletions proto/cmd/ch-gen-col/main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

package proto

import (
"encoding/binary"
)

var _ = binary.LittleEndian // clickHouse uses LittleEndian

// {{ .Type }} represents {{ .Name }} column.
type {{ .Type }} []{{ .ElemType }}

Expand Down
2 changes: 1 addition & 1 deletion proto/cmd/ch-gen-col/safe.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- /*gotype: github.com/go-faster/ch/proto/cmd/ch-gen-col.Variant*/ -}}
{{ if .GenerateUnsafe }}//go:build !amd64 || nounsafe{{ end }}
{{ if .GenerateUnsafe }}//go:build !(amd64 || arm64) || purego{{ end }}
// Code generated by ./cmd/ch-gen-int, DO NOT EDIT.

package proto
Expand Down
2 changes: 1 addition & 1 deletion proto/cmd/ch-gen-col/unsafe.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- /*gotype: github.com/go-faster/ch/proto/cmd/ch-gen-col.Variant*/ -}}
//go:build amd64 && !nounsafe
//go:build (amd64 || arm64) && !purego
// Code generated by ./cmd/ch-gen-int, DO NOT EDIT.

package proto
Expand Down
2 changes: 1 addition & 1 deletion proto/col_bool_safe.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !amd64 || nounsafe
//go:build !(amd64 || arm64) || purego

package proto

Expand Down
2 changes: 1 addition & 1 deletion proto/col_bool_unsafe.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build amd64 && !nounsafe
//go:build (amd64 || arm64) && !purego

package proto

Expand Down
6 changes: 0 additions & 6 deletions proto/col_date32_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_date32_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_date32_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_date_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_date_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_date_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_datetime64_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_datetime64_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_datetime64_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_datetime_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_datetime_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_datetime_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_decimal128_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal128_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal128_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_decimal256_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal256_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal256_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_decimal32_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal32_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal32_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_decimal64_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal64_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_decimal64_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_enum16_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_enum16_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_enum16_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_enum8_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_enum8_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_enum8_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_float32_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_float32_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_float32_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_float64_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_float64_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_float64_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_int128_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_int128_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_int128_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions proto/col_int16_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_int16_safe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/col_int16_unsafe_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d428956

Please sign in to comment.