internal

package
v0.0.0-...-0bb1a8c Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Internal API, not to be exported

Index

Constants

View Source
const (
	// NetCDF default fill values as defined in the NetCDF4 specification
	FillByte   int8   = -127
	FillChar   uint8  = 0
	FillShort  int16  = -32767
	FillInt    int32  = -2147483647
	FillFloat  uint32 = 0x7cf00000
	FillDouble uint64 = 0x479e000000000000

	// NetCDF additions defined in the CDF-5 specification
	FillUByte  uint8  = 255
	FillUShort uint16 = 65535
	FillUInt   uint32 = 4294967295
	FillInt64  int64  = -9223372036854775806
	FillUInt64 uint64 = 0xfffffffffffffffe
)
View Source
const (
	// error levels that should almost always be printed
	LevelFatal LogLevel = iota // error that must stop the program (panics)
	LevelError                 // error that does not need to stop execution

	// debugging levels, okay to disable
	LevelWarn // something may be wrong, but not necessarily an error
	LevelInfo // nothing wrong, informational only

	// Production code by default only shows warnings and above.
	LogLevelDefault = LevelWarn

	// min, max levels for setting print level
	LevelMin = LevelFatal
	LevelMax = LevelInfo
)

Variables

This section is empty.

Functions

func IsValidNetCDFName

func IsValidNetCDFName(name string) bool

IsValidNetCDFName returns true if name is a valid NetCDF name.

func NewFillValueReader

func NewFillValueReader(repeat []byte) io.Reader

func NewSlicer

func NewSlicer(getSlice func(begin, end int64) (any, error),
	getSliceMD func(begin, end []int64) (any, error),
	length int64, shape []int64, dimNames []string, attributes api.AttributeMap,
	cdlType string, goType string) api.VarGetter

func SliceMD

func SliceMD(data any, dimensions []uint64, begin, end []int64) (any, error)

Types

type FillValueReader

type FillValueReader struct {
	// contains filtered or unexported fields
}

func (*FillValueReader) Read

func (fvr *FillValueReader) Read(p []byte) (int, error)

type LogLevel

type LogLevel int

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Error

func (l *Logger) Error(v ...any)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(v ...any)

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...any)

func (*Logger) Info

func (l *Logger) Info(v ...any)

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...any)

func (*Logger) LogLevel

func (l *Logger) LogLevel() LogLevel

func (*Logger) SetLogLevel

func (l *Logger) SetLogLevel(level LogLevel) LogLevel

SetLogLevel returns the old level

func (*Logger) Warn

func (l *Logger) Warn(v ...any)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...any)

Jump to

Keyboard shortcuts

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