Skip to content

Commit fe057a4

Browse files
committed
update testing status badge
1 parent afa9b2f commit fe057a4

1 file changed

Lines changed: 16 additions & 23 deletions

File tree

README.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
1-
htmlquery
2-
====
3-
[![Build Status](https://travis-ci.org/antchfx/htmlquery.svg?branch=master)](https://travis-ci.org/antchfx/htmlquery)
4-
[![Coverage Status](https://coveralls.io/repos/github/antchfx/htmlquery/badge.svg?branch=master)](https://coveralls.io/github/antchfx/htmlquery?branch=master)
1+
# htmlquery
2+
3+
[![Build Status](https://github.com/antchfx/htmlquery/actions/workflows/testing.yml/badge.svg)](https://github.com/antchfx/htmlquery/actions/workflows/testing.yml)
54
[![GoDoc](https://godoc.org/github.com/antchfx/htmlquery?status.svg)](https://godoc.org/github.com/antchfx/htmlquery)
65
[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/htmlquery)](https://goreportcard.com/report/github.com/antchfx/htmlquery)
76

8-
Overview
9-
====
7+
# Overview
108

119
`htmlquery` is an XPath query package for HTML, lets you extract data or evaluate from HTML documents by an XPath expression.
1210

13-
`htmlquery` built-in the query object caching feature based on [LRU](https://godoc.org/github.com/golang/groupcache/lru), this feature will caching the recently used XPATH query string. Enable query caching can avoid re-compile XPath expression each query.
11+
`htmlquery` built-in the query object caching feature based on [LRU](https://godoc.org/github.com/golang/groupcache/lru), this feature will caching the recently used XPATH query string. Enable query caching can avoid re-compile XPath expression each query.
1412

1513
You can visit this page to learn about the supported XPath(1.0/2.0) syntax. https://github.com/antchfx/xpath
1614

17-
XPath query packages for Go
18-
===
15+
# XPath query packages for Go
16+
1917
| Name | Description |
2018
| ------------------------------------------------- | ----------------------------------------- |
2119
| [htmlquery](https://github.com/antchfx/htmlquery) | XPath query package for the HTML document |
2220
| [xmlquery](https://github.com/antchfx/xmlquery) | XPath query package for the XML document |
2321
| [jsonquery](https://github.com/antchfx/jsonquery) | XPath query package for the JSON document |
2422

25-
Installation
26-
====
23+
# Installation
2724

2825
```
2926
go get github.com/antchfx/htmlquery
3027
```
3128

32-
Getting Started
33-
====
29+
# Getting Started
3430

3531
#### Query, returns matched elements or error.
3632

@@ -70,13 +66,13 @@ list := htmlquery.Find(doc, "//a")
7066
#### Find all A elements that have `href` attribute.
7167

7268
```go
73-
list := htmlquery.Find(doc, "//a[@href]")
69+
list := htmlquery.Find(doc, "//a[@href]")
7470
```
7571

7672
#### Find all A elements with `href` attribute and only return `href` value.
7773

7874
```go
79-
list := htmlquery.Find(doc, "//a/@href")
75+
list := htmlquery.Find(doc, "//a/@href")
8076
for _ , n := range list{
8177
fmt.Println(htmlquery.SelectAttr(n, "href")) // output @href value
8278
}
@@ -89,6 +85,7 @@ a := htmlquery.FindOne(doc, "//a[3]")
8985
```
9086

9187
### Find children element (img) under A `href` and print the source
88+
9289
```go
9390
a := htmlquery.FindOne(doc, "//a")
9491
img := htmlquery.FindOne(a, "//img")
@@ -103,9 +100,7 @@ v := expr.Evaluate(htmlquery.CreateXPathNavigator(doc)).(float64)
103100
fmt.Printf("total count is %f", v)
104101
```
105102

106-
107-
Quick Starts
108-
===
103+
# Quick Starts
109104

110105
```go
111106
func main() {
@@ -127,9 +122,7 @@ func main() {
127122
}
128123
```
129124

130-
131-
FAQ
132-
====
125+
# FAQ
133126

134127
#### `Find()` vs `QueryAll()`, which is better?
135128

@@ -158,6 +151,6 @@ BenchmarkDisableSelectorCache-4 500000 3162 ns/op
158151
htmlquery.DisableSelectorCache = true
159152
```
160153

161-
Questions
162-
===
154+
# Questions
155+
163156
Please let me know if you have any questions.

0 commit comments

Comments
 (0)