tdetect

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tdetect provides types detections means.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBasic

func IsBasic(t types.Type, kind types.BasicKind) bool

IsBasic checks if the type is the basic one with the kind given.

func IsByteSlice added in v0.4.0

func IsByteSlice(v types.Type) bool

IsByteSlice checks if the type represents []byte

func IsErrorType

func IsErrorType(t types.Type) bool

IsErrorType checks if type is the error.

func TypeImplementsDecoder

func TypeImplementsDecoder(t types.Type) bool

TypeImplementsDecoder checks if type implements decoder interface:

type Decoder interface{
    Decode([]byte) ([]byte, error)
}

func TypeImplementsEncoder

func TypeImplementsEncoder(t types.Type) bool

TypeImplementsEncoder checks if type implements encoder interface:

type Encoder interface{
    Len() int
    Encode([]byte) error
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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