goutil

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

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 6 Imported by: 0

README

goutil

golang工具包

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHyperlinks(url string) ([]string, error)

获得一个网址的所有超链接

func GetImagesLinks(url string) ([]string, error)

获得一个网址的所有图片链接

func GetStringsFromJson

func GetStringsFromJson(jsonName string) ([]string, error)

从一个json文件读取数据,返回字符串数组,json文件格式如下: {"Data":["xx","xx","xx",...]}

func IsExist

func IsExist(fileName string) bool

判断文件是否存在

func RandIntArray

func RandIntArray(num, n int) []int

获得一个范围(-n~n)的整型随机数组

Types

type Data

type Data struct {
	Data []string
}

Jump to

Keyboard shortcuts

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