util

package
v0.0.0-...-5584581 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(values ...string) string

func DomainContextToDomainSuffix

func DomainContextToDomainSuffix(dn string) string

func DomainSuffixToDomainContext

func DomainSuffixToDomainContext(domain string) string

func ExePath

func ExePath() (string, error)

func ExtractDomainContextFromDistinguishedName

func ExtractDomainContextFromDistinguishedName(dn string) string

func ExtractNetbiosFromBase

func ExtractNetbiosFromBase(dn string) string

func FiletimeToTime

func FiletimeToTime(filetime uint64) time.Time

Filetype converts 100-nanoseconds intervals since Jan 1, 1601 UTC to time.Time

func Hexify

func Hexify(s string) string

func IsASCII

func IsASCII(s string) bool

func KeysToSlice

func KeysToSlice[K comparable, V any](m map[K]V) []K

func ParentDistinguishedName

func ParentDistinguishedName(dn string) string

func ParseBool

func ParseBool(input string, defvalue ...bool) (bool, error)

func PathExists

func PathExists(name string) bool

func ReadJSON

func ReadJSON(filename string, obj interface{}) (err error)

Takes a filename and reads the JSON representation of an object into it, returns an error if it fails.

func StringScrambler

func StringScrambler(s string) string

func SwapUUIDEndianess

func SwapUUIDEndianess(u uuid.UUID) uuid.UUID

func WriteJSON

func WriteJSON(filename string, obj interface{}) (err error)

Takes a filename and any object and writes its JSON representation to the file, returns an error if it fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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