octosql: github.com/cube2222/octosql/parser/sqlparser/dependency/hack Index | Files

package hack

import "github.com/cube2222/octosql/parser/sqlparser/dependency/hack"

Package hack gives you some efficient functionality at the cost of breaking some Go rules.


Package Files


func String Uses

func String(b []byte) (s string)

String force casts a []byte to a string. USE AT YOUR OWN RISK

func StringPointer Uses

func StringPointer(s string) unsafe.Pointer

StringPointer returns &s[0], which is not allowed in go

type StringArena Uses

type StringArena struct {
    // contains filtered or unexported fields

StringArena lets you consolidate allocations for a group of strings that have similar life length

func NewStringArena Uses

func NewStringArena(size int) *StringArena

NewStringArena creates an arena of the specified size.

func (*StringArena) NewString Uses

func (sa *StringArena) NewString(b []byte) string

NewString copies a byte slice into the arena and returns it as a string. If the arena is full, it returns a traditional go string.

func (*StringArena) SpaceLeft Uses

func (sa *StringArena) SpaceLeft() int

SpaceLeft returns the amount of space left in the arena.

Package hack imports 2 packages (graph) and is imported by 1 packages. Updated 2019-08-11. Refresh now. Tools for package owners.