utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequiredFlags

func CheckRequiredFlags(cmd *cobra.Command, flagNames ...string) error

CheckRequiredFlags checks if the required flags are set

func CreateClient

func CreateClient(cmd *cobra.Command) (*docbase.API, error)

CreateClient creates a DocBase API client

func FormatGroups

func FormatGroups(groups []docbase.Group) string

FormatGroups formats groups for display

func FormatTags

func FormatTags(tags []docbase.Tag) string

FormatTags formats tags for display

func PrintError

func PrintError(err error)

PrintError prints an error message

func PrintInfo

func PrintInfo(message string)

PrintInfo prints an info message

func PrintSuccess

func PrintSuccess(message string)

PrintSuccess prints a success message

func PrintWarning

func PrintWarning(message string)

PrintWarning prints a warning message

func ReadFile

func ReadFile(filePath string) (string, error)

ReadFile reads a file and returns its content

func TruncateString

func TruncateString(s string, maxLen int) string

TruncateString truncates a string to the specified length

Types

This section is empty.

Jump to

Keyboard shortcuts

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