utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package utils provides minimal utility functions for string conversion, timestamp generation, and file system helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDir

func EnsureDir(path string) error

EnsureDir creates the directory at path (including parents) if it does not already exist. Returns nil if the directory already exists.

func FileExists

func FileExists(path string) bool

FileExists reports whether the named file or directory exists.

func TimestampPrefix

func TimestampPrefix() string

TimestampPrefix returns the current time formatted as YYYYMMDDHHMMSS.

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a CamelCase or mixed-case string to snake_case. For example, "CreateUsers" becomes "create_users" and "getHTTPResponse" becomes "get_http_response".

Types

This section is empty.

Jump to

Keyboard shortcuts

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