Documentation
¶
Index ¶
- func BytesToString(b []byte) string
- func CondenseEmptyLines(s string) string
- func CreateIfNotExists(path string, isDir bool) error
- func DecodeRawUnicodeEscape(s string) string
- func EnsureTrailingNewline(s string) string
- func IsExist(path string) bool
- func MakeDir(dir string) error
- func RelToCwd(path string) string
- func RemoveIfExist(path string) error
- func ReplaceSubscript(s string) string
- func ReplaceSuperscript(s string) string
- func StringToBytes(s string) []byte
- func Truncate(filename string) error
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts byte slice to string.
func CondenseEmptyLines ¶ added in v0.2.2
CondenseEmptyLines condenses multiple consecutive empty lines in a string to a single empty line, while preserving non-empty lines.
func CreateIfNotExists ¶
CreateIfNotExists creates a file or a directory only if it does not already exist.
func DecodeRawUnicodeEscape ¶
func EnsureTrailingNewline ¶ added in v0.2.2
func RemoveIfExist ¶
func ReplaceSubscript ¶
func ReplaceSuperscript ¶
func StringToBytes ¶
StringToBytes converts string to byte slice.
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(per time.Duration) *RateLimiter
func (*RateLimiter) Take ¶ added in v0.2.1
func (r *RateLimiter) Take()
Click to show internal directories.
Click to hide internal directories.