pathpool

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pathsplit

type Pathsplit struct {
	Dirname  string
	Filename string
}

func Split

func Split(pathname string, pool *StringPool) Pathsplit

func (Pathsplit) Join

func (p Pathsplit) Join() string

type StringPool

type StringPool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

"Strings" are really headers with a backing store, so by storing and reusing strings, we may be able to reuse the underlying backing store.

func NewPool

func NewPool() *StringPool

func (*StringPool) Intern

func (sp *StringPool) Intern(s string) string

Try to find and return a string in the pool map, and add it if it isn't already there. Not concurrency safe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL