{"modulePath":"github.com/dnote/Dnote","version":"v0.6.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Functions\n\n```go\nfunc AskConfirmation(question string, optimistic bool) (bool, error)\n```\nAskConfirmation prompts for user input to confirm a choice\n\n```go\nfunc CopyDir(src, dest string) error\n```\nCopyDir copies a directory from src to dest, recursively copying nested directories\n\n```go\nfunc CopyFile(src, dest string) error\n```\nCopyFile copies a file from the src to dest\n\n```go\nfunc DoAuthorizedReq(ctx infra.DnoteCtx, hc http.Client, method, path, body string) (*http.Response, error)\n```\nDoAuthorizedReq does a http request to the given path in the api endpoint as a user, with the appropriate headers. The given path should include the preceding slash.\n\n```go\nfunc DoReq(ctx infra.DnoteCtx, method, path, body string) (*http.Response, error)\n```\nDoReq does a http request to the given path in the api endpoint\n\n```go\nfunc FileExists(filepath string) bool\n```\nFileExists checks if the file exists at the given path\n\n```go\nfunc GenerateUUID() string\n```\nGenerateUUID returns a uid\n\n```go\nfunc PromptInput(message string, dest *string) error\n```\nPromptInput prompts the user input and saves the result to the destination\n\n```go\nfunc PromptPassword(message string, dest *string) error\n```\nPromptPassword prompts the user input a password and saves the result to the destination. The input is masked, meaning it is not echoed on the terminal.\n\n","path":"github.com/dnote/Dnote/utils","name":"utils","synopsis":"","isRedistributable":true}
