stringpool

package
v0.0.0-...-1542595 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 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

Jump to

Keyboard shortcuts

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