utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) bool

DirExists checks if a directory exists

func EnsureDir

func EnsureDir(path string) error

EnsureDir ensures a directory exists

func FileExists

func FileExists(path string) bool

FileExists checks if a file exists

func GetHost

func GetHost(conf *config.Config, tenant string, ports ...int) string

GetHost constructs the URL based on the given tenant and config, with an optional port.

func GetPlatform

func GetPlatform() string

func GetPlatformExt

func GetPlatformExt() string

GetPlatformExt returns the platform-specific extension

func PathExists

func PathExists(path string) (bool, error)

PathExists checks if a file or directory exists

func ValidateName

func ValidateName(name string) bool

ValidateName validates a name

func WriteTemplateFile

func WriteTemplateFile(path, content string, data any) error

WriteTemplateFile writes a template file with provided data

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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