util

package
v0.0.0-...-02edade Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(path string) bool

func GetCallFileFromCallStack

func GetCallFileFromCallStack(skip int) (string, bool)

func GetColorForID

func GetColorForID(id int) *color.Color

func GetCurrentGoID

func GetCurrentGoID() uint64

func GetExecutablePath

func GetExecutablePath() string

프로그램 작업 디렉토리 가져오기

func GetWaitGroup

func GetWaitGroup() *sync.WaitGroup

func MapRange

func MapRange(n, srcMin, srcMax, dstMin, dstMax float64) float64

func NormalizeLanguageCode

func NormalizeLanguageCode(s string) string

func PanicToErrorW

func PanicToErrorW(f func()) func() *ErrorW

func StringConcat

func StringConcat(sep string, strs ...string) string

문자열 Join

Types

type Broker

type Broker[T any] struct {
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker[T any]() *Broker[T]

func (*Broker[T]) Publish

func (b *Broker[T]) Publish(msg T)

func (*Broker[T]) Start

func (b *Broker[T]) Start()

func (*Broker[T]) Stop

func (b *Broker[T]) Stop()

func (*Broker[T]) Subscribe

func (b *Broker[T]) Subscribe() chan T

func (*Broker[T]) Unsubscribe

func (b *Broker[T]) Unsubscribe(msgCh chan T)

type ErrorW

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

func NewErrorW

func NewErrorW(errorObj error, critical bool, callStackSkip int) *ErrorW

func (*ErrorW) AddCallStack

func (ew *ErrorW) AddCallStack(skip int, force bool) bool

func (*ErrorW) CallFile

func (ew *ErrorW) CallFile() string

func (*ErrorW) Critical

func (ew *ErrorW) Critical() bool

type Index

type Index struct {
	Start int
	End   int
}

func NewIndex

func NewIndex(start, end int) *Index

func (Index) Equal

func (a Index) Equal(b Index) bool

func (Index) Size

func (a Index) Size() int

type PlotDrawEndEventArgs

type PlotDrawEndEventArgs struct {
	PlotPixelXStart float64
	PlotPixelXEnd   float64
	PlotPointStart  float64
	PlotPointEnd    float64
}

type SimpleContext

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

func NewSimpleContext

func NewSimpleContext() *SimpleContext

func (*SimpleContext) Cancel

func (sc *SimpleContext) Cancel()

func (*SimpleContext) Context

func (sc *SimpleContext) Context() context.Context

func (*SimpleContext) IsCancelled

func (sc *SimpleContext) IsCancelled() bool

type WaveformPlotData

type WaveformPlotData struct {
	X []float64
	Y []float64
}

func NewWaveformPlotData

func NewWaveformPlotData(length, capacity int) *WaveformPlotData

func (*WaveformPlotData) Clear

func (wd *WaveformPlotData) Clear()

func (*WaveformPlotData) LengthX

func (wd *WaveformPlotData) LengthX() int

func (*WaveformPlotData) LengthY

func (wd *WaveformPlotData) LengthY() int

Jump to

Keyboard shortcuts

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