size

package
v0.0.0-...-ed913b5 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package size provides functions to compute the size of some complex types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSizeOfStringSlice

func DataSizeOfStringSlice(v []string) int

DataSizeOfStringSlice returns the size of the content of the string slice in bytes.

func SizeOfStringSlice

func SizeOfStringSlice(s []string) int

SizeOfStringSlice returns the size of the string slice in bytes (not counting the size of the strings themselves).

Types

type HasSizeInBytes

type HasSizeInBytes interface {
	// SizeInBytes Return the size of the object in bytes (not including the size of its content)
	SizeInBytes() int

	// DataSizeInBytes Return the size of content of the object in bytes
	DataSizeInBytes() int
}

HasSizeInBytes is an interface that can be implemented by any object that has a size in bytes

Jump to

Keyboard shortcuts

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