utils

package
v0.0.0-...-c423126 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanData

func CleanData(data, tagsFileDir, tagsFileName string) string

CleanData clean data by replacing errors during translation

func CleanKey

func CleanKey(key string) string

CleanKey change separator

func CreateFile

func CreateFile(path string)

CreateFile create file

func Download

func Download(url string, filename string, timeout int64, sheet string, checkCSV bool) (err error)

Download exported

func DownloadURL

func DownloadURL(cell string, sheet string) string

DownloadURL Download the file in the url

func GetAbsoluteFilePath

func GetAbsoluteFilePath(relFilePath string, sheet string) (result string, err error)

GetAbsoluteFilePath get abs path

func MkDirIfNotExists

func MkDirIfNotExists(path string) error

MkDirIfNotExists create direcory if not exists

func OpenCSVFile

func OpenCSVFile(csvFilePath string) ([][]string, error)

OpenCSVFile open csv file

Types

type CleanTranslation

type CleanTranslation struct {
	Error *string `json:"error"`
	Fix   *string `json:"fix"`
}

CleanTranslation struct used to clean hugo translations files

func GetCleanTranslationTags

func GetCleanTranslationTags(fileDir, fileName string) ([]*CleanTranslation, error)

GetCleanTranslationTags get clean translation tags

Jump to

Keyboard shortcuts

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