Documentation
¶
Index ¶
- func CallerFile(deep int) (path string, line int)
- func CallerFileName(deep int) string
- func CallerFilePath(deep int) string
- func ConstantTimeCompareStrings(a, b string) bool
- func GeneratePEMCert(bits int, organization string, maxAge time.Duration) (cert, key []byte, err error)
- func GenerateTLSCert(bits int, organization string, maxAge time.Duration) (*tls.Certificate, error)
- func ImageJPGThumbnail(src io.Reader, filename string, maxWidth, maxHeight uint) ([]byte, error)
- func ImageJPGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
- func ImagePNGThumbnail(src io.Reader, filename string, maxWidth, maxHeight uint) ([]byte, error)
- func ImagePNGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
- func ImageRead(filename string, src io.Reader) (image.Image, error)
- func NewDiscardLogger() *log.Logger
- func Perm(s []string, f func([]string))
- func RandBytes(n int) []byte
- func RandBytesTo(buf []byte)
- func RandInit()
- func RandString(n int) string
- func RuntimePkgFileLineByPC(pc uintptr) (file string, line int)
- func RuntimePkgFileLineStrByPC(pc uintptr) string
- func RuntimePkgIndex(file, funcName string) int
- func RuntimePkgPath() string
- func SwapFileExtension(filename, targetExt string) string
- func ToSnakeCase(s string) string
- func WaitForExit()
- func Workdir() string
- func WorkdirDSN() string
- func ZAtob(s string) []byte
- func ZBtoa(b []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerFile ¶
CallerFile returns caller file path and line
func CallerFileName ¶
CallerFileName returns name of caller file
func CallerFilePath ¶
CallerFilePath returns path to caller file
func ConstantTimeCompareStrings ¶
ConstantTimeCompareStrings uses zero alloc converting to bytes
func GeneratePEMCert ¶
func GeneratePEMCert(bits int, organization string, maxAge time.Duration) (cert, key []byte, err error)
GeneratePEMCert self-signed
func GenerateTLSCert ¶
GenerateTLSCert self-signed
func ImageJPGThumbnail ¶
ImageJPGThumbnail converter
func ImageJPGThumbnailTo ¶
func ImageJPGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
ImageJPGThumbnailTo converter
func ImagePNGThumbnail ¶
ImagePNGThumbnail converter
func ImagePNGThumbnailTo ¶
func ImagePNGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
ImagePNGThumbnailTo converter
func RuntimePkgFileLineByPC ¶
RuntimePkgFileLineByPC caller
func RuntimePkgFileLineStrByPC ¶
RuntimePkgFileLineStrByPC caller
func SwapFileExtension ¶
func WorkdirDSN ¶
func WorkdirDSN() string
WorkdirDSN returns executable working dir as DSN path
Example on windows: c/users/user/Desktop
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.