utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2022 Lanly

Copyright © 2022 Lanly

Index

Constants

View Source
const TimeTemplate string = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func Copy

func Copy(src string, dest string) error

func FileExist

func FileExist(path string) bool

func FileSize

func FileSize(fileName string) (int, error)

func Md5

func Md5(filePath string) (string, error)

func ReadCsv

func ReadCsv(filepath string) [][]string

func ReadFile

func ReadFile(fileName string) (string, error)

func SetToOrderStringSlice added in v0.3.1

func SetToOrderStringSlice(set mapset.Set) []string

func WriteCsv

func WriteCsv(filepath string, datas [][]string) error

func WriteFile

func WriteFile(fileName string, data string) error

Types

type Data

type Data struct {
	Path       string
	Name       string
	Problem    string
	Extension  string
	FileName   string
	Md5        string
	Size       int64
	ModifyTime time.Time
}

func ResolvePath

func ResolvePath(path string) (Data, error)

func (*Data) Output

func (s *Data) Output() string

func (*Data) String

func (s *Data) String() string

type Moss

type Moss struct {
	UserId       string
	Language     string
	MaxLimit     int64
	Comment      string
	Experimental int
	NumberResult int64
	Files        []string
}

func (*Moss) AddFile

func (moss *Moss) AddFile(file string)

func (*Moss) Review

func (moss *Moss) Review() string

Jump to

Keyboard shortcuts

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