parse

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parse

type Parse interface {
	ParseRemoteFile(url string) (urls []string, err error)
	ParseLocalFile(path string) (urls []string, err error)
}

type SiteMap

type SiteMap struct {
	// contains filtered or unexported fields
}

站点地图文件解析 站点地图 XML 格式 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
	<loc>http://blog.mjava.top/gof/gof-singleton/</loc>
	<lastmod>2021-06-15T07:14:24.487Z</lastmod>
</url>

</urlset>

func NewSiteMap added in v1.1.0

func NewSiteMap(pushCount int) *SiteMap

func (SiteMap) ParseLocalFile

func (s SiteMap) ParseLocalFile(filePath string) (urls []string, err error)

func (SiteMap) ParseRemoteFile

func (s SiteMap) ParseRemoteFile(url string) (urls []string, err error)

type UrlsFile

type UrlsFile struct {
}

批量 URL 文件解析 文件格式:

http://example.com/index.html
http://example.com/index.html
http://example.com/index.html

每一行一个 URL 地址

func (UrlsFile) ParseLocalFile

func (u UrlsFile) ParseLocalFile(path string) (urls []string, err error)

func (UrlsFile) ParseRemoteFile

func (u UrlsFile) ParseRemoteFile(url string) (urls []string, err error)

Jump to

Keyboard shortcuts

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