utils

package
v0.0.0-...-f219ead Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfPathExist

func CheckIfPathExist(path string) bool

func CheckIfServiceIsActive

func CheckIfServiceIsActive(serv string) (bool, error)

CheckIfServiceIsActive checks if a service is active or running

func CleanString

func CleanString(s string) string

func CreateLogger

func CreateLogger(filename string) *logger.Logger

CreateLogger returns a single instance of a Logger configured to save logs to a rotating file.

func Execute

func Execute(c string, dir string, arg ...string) error

func ExecuteWithResult

func ExecuteWithResult(c string, dir string, arg ...string) (string, bool)

func GetMyPath

func GetMyPath() (string, error)

GetMyPath returns the directory path where the currently running executable is located. Returns a string representing the directory path, and an error if any error occurs during the process.

func RestartService

func RestartService(serv string) error

RestartService restarts a service

func StopService

func StopService(name string) error

func UninstallService

func UninstallService(name string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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