ecommon

package module
v0.0.0-...-e53d801 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 7 Imported by: 0

README

ecommon

A collection of golang common methods

Package functionality
slices Golang slices and arrays with common wrappers.
sse Simple Server-sent Events Server and Client.
email SMTP mail library based on gopkg.in/domail.v2
bitwise Encryption and decryption using bit operations
File functionality
file Golang encapsulate some methods related to files.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(filePath string) (*os.File, error)

CreateFile 创建文件,如果路径不存在则自动创建目录

func DownloadFile

func DownloadFile(url string) (*[]byte, error)

DownloadFile using HTTP get and skip SSL verification, returning a pointer to [] byte

func GetAttachmentName

func GetAttachmentName(path, sep string) string

GetAttachmentName determines the file name in the path using a custom delimiter (if there is no custom delimiter, the last part of the path is taken by default) Path file path Sep custom delimiter defaults to`|`

func GetFileContent

func GetFileContent(url string) ([]byte, error)

GetFileContent to retrieve file content Determine whether to use HTTP download by checking if the URL contains http://| https://

Types

This section is empty.

Directories

Path Synopsis
sse
Package sse implements Server-Sent Events, as specified in RFC 6202.
Package sse implements Server-Sent Events, as specified in RFC 6202.

Jump to

Keyboard shortcuts

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