utils

package
v0.0.0-...-4c0342d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildAt string
View Source
var ConfigFileName = "leetcodectl.toml"
View Source
var CustomPath = "imoh"
View Source
var DefaultLanguage = "go"
View Source
var DefaultLogPath = path.Join(RootPath, CustomPath, "leetcodectl.log")
View Source
var DefaultPathName = ".leetcodectl"
View Source
var GitCommit string
View Source
var RootPath = DefaultRootPath()
View Source
var Version string

Functions

func AddBaseHeaders

func AddBaseHeaders(req *http.Request)

func AddCommonHeader

func AddCommonHeader(req *http.Request)

func AddJsonHeaders

func AddJsonHeaders(req *http.Request)

func CheckFileExist

func CheckFileExist(filePath string)

func CreateFileIfNotExist

func CreateFileIfNotExist(filepath string) error

func CreateFileWithParents

func CreateFileWithParents(filePath string) error

func DefaultRootPath

func DefaultRootPath() string

func FileExist

func FileExist(filePath string) error

func GenerateQueryGraphql

func GenerateQueryGraphql(titleSlug string) string

func GenerateSubmissionHistoryGraphql

func GenerateSubmissionHistoryGraphql(titleSlug string, limit int) string

func GenerateSubmitBody

func GenerateSubmitBody(questionId string, lang string, typedCode string) string

func Pad

func Pad(width int, content string) string

func ResUnmarshal

func ResUnmarshal(resBytes []byte, ts interface{}) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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