stringpool

package
Version: v0.0.0-...-c88c75b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

stringpool provides a pool of string pointers, ensuring that each string is stored only once in memory. This is useful for queries that have many results, as the amount of source packages is limited. So, as soon as len(results) > len(sourcepackages), you save memory using a stringpool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringPool

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

func NewStringPool

func NewStringPool() *StringPool

func (*StringPool) Get

func (pool *StringPool) Get(s string) *string

Source Files

Jump to

Keyboard shortcuts

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