utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package utils @Author Clover @Data 2025/1/8 下午4:05:00 @Desc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToWindows

func ConvertToWindows(fileName string, isImg bool) (string, error)

ConvertToWindows 根据给定的文件名生成一个在 Windows 操作系统中安全的文件路径。 它将一个可选的子目录('img' 或 'file')添加到临时目录中。

参数: fileName: 要转换的文件名。 isImg: 一个布尔值,指示文件是否为图像。如果为 true,则将 'img' 子目录添加到路径中;否则,添加 'file' 子目录。

返回值: string: 转换后的 Windows 文件路径。 error: 如果获取临时目录或创建目录时出错,则返回错误。

func TempDir

func TempDir() string

TempDir for go:linkname

Types

This section is empty.

Directories

Path Synopsis
Package base64util @Author Clover @Date 2025/1/9 下午3:00:00 @Desc Base64 工具类
Package base64util @Author Clover @Date 2025/1/9 下午3:00:00 @Desc Base64 工具类
Package imgutil @Author Clover @Data 2024/7/22 下午1:53:00 @Desc 图片处理工具类
Package imgutil @Author Clover @Data 2024/7/22 下午1:53:00 @Desc 图片处理工具类
Package timeutil @Author Clover @Data 2024/7/21 下午11:39:00 @Desc
Package timeutil @Author Clover @Data 2024/7/21 下午11:39:00 @Desc

Jump to

Keyboard shortcuts

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