Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#82 cleanup comments #83

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
```go
b.Release()
// b itself, all objects created manually and used in b.Set(), all objects got using `b.Get()` are released also.
// nor these objects neither result of `b.ToBytes()` must not be used from now on
// neither these objects nor result of `b.ToBytes()` must not be used from now on
```
- Iterate over fields which has value
```go
Expand Down
14 changes: 1 addition & 13 deletions dynobuffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,17 @@ import (
"gopkg.in/yaml.v2"
)

// FieldType s.e.
type FieldType int

const (
// FieldTypeUnspecified - wrong type
FieldTypeUnspecified FieldType = iota
// FieldTypeObject field is nested Scheme
FieldTypeObject
// FieldTypeInt32 int32
FieldTypeInt32
// FieldTypeInt64 int64
FieldTypeInt64
// FieldTypeFloat32 float32
FieldTypeFloat32
// FieldTypeFloat64 float64
FieldTypeFloat64
// FieldTypeString variable length
FieldTypeString
// FieldTypeBool bool
FieldTypeBool
// FieldTypeByte byte
FieldTypeByte
)

Expand Down Expand Up @@ -82,7 +72,6 @@ type IRelease interface {
Release()
}

// Field describes a Scheme field
type Field struct {
Name string
Ft FieldType
Expand Down Expand Up @@ -231,7 +220,7 @@ func NewBuffer(scheme *Scheme) *Buffer {
}

// Release returns used Buffer into pool
// Note: Buffer instance itself, result of ToBytes() must not be used after Release()
// Note: neither Buffer instance itself nor result of ToBytes() must not be used after Release()
func (b *Buffer) Release() {
if b.isReleased {
return
Expand Down Expand Up @@ -2159,7 +2148,6 @@ func YamlToScheme(yamlStr string) (*Scheme, error) {
return MapSliceToScheme(mapSlice)
}

// MapSliceToScheme s.e.
func MapSliceToScheme(mapSlice yaml.MapSlice) (*Scheme, error) {
res := NewScheme()
for _, mapItem := range mapSlice {
Expand Down
Loading