go-goquery import to wip

This commit is contained in:
K.I.A.Derouiche 2020-12-27 15:48:54 +01:00
parent 88f7dbc295
commit 9e605ed870
6 changed files with 69 additions and 0 deletions

View File

@ -1178,6 +1178,7 @@ SUBDIR+= go-ghodss-yaml
SUBDIR+= go-godot
SUBDIR+= go-gomail
SUBDIR+= go-gopacket
SUBDIR+= go-goquery
SUBDIR+= go-humanize
SUBDIR+= go-jira
SUBDIR+= go-junit-report
@ -1192,6 +1193,7 @@ SUBDIR+= go-properties-map
SUBDIR+= go-protobuf-go
SUBDIR+= go-rateio
SUBDIR+= go-rest
SUBDIR+= go-resty
SUBDIR+= go-trie
SUBDIR+= go-upspin
SUBDIR+= goattracker

23
go-goquery/DESCR Normal file
View File

@ -0,0 +1,23 @@
TODO: Adjust the following lines from README.md
# goquery - a little like that j-thing, only in Go
[![build status](https://secure.travis-ci.org/PuerkitoBio/goquery.svg?branch=master)](http://travis-ci.org/PuerkitoBio/goquery) [![GoDoc](https://godoc.org/github.com/PuerkitoBio/goquery?status.png)](http://godoc.org/github.com/PuerkitoBio/goquery) [![Sourcegraph Badge](https://sourcegraph.com/github.com/PuerkitoBio/goquery/-/badge.svg)](https://sourcegraph.com/github.com/PuerkitoBio/goquery?badge)
goquery brings a syntax and a set of features similar to [jQuery][] to the [Go language][go]. It is based on Go's [net/html package][html] and the CSS Selector library [cascadia][]. Since the net/html parser returns nodes, and not a full-featured DOM tree, jQuery's stateful manipulation functions (like height(), css(), detach()) have been left off.
Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML. See the [wiki][] for various options to do this.
Syntax-wise, it is as close as possible to jQuery, with the same function names when possible, and that warm and fuzzy chainable interface. jQuery being the ultra-popular library that it is, I felt that writing a similar HTML-manipulating library was better to follow its API than to start anew (in the same spirit as Go's `fmt` package), even though some of its methods are less than intuitive (looking at you, [index()][index]...).
## Table of Contents
* [Installation](#installation)
* [Changelog](#changelog)
* [API](#api)
* [Examples](#examples)
* [Related Projects](#related-projects)
* [Support](#support)
* [License](#license)
## Installation
...

19
go-goquery/Makefile Normal file
View File

@ -0,0 +1,19 @@
# $NetBSD$
DISTNAME= go-goquery-1.6.0
GITHUB_PROJECT= goquery
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_GITHUB:=PuerkitoBio/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= kamelderouiche@yahoo.com
HOMEPAGE= https://github.com/PuerkitoBio/goquery/
COMMENT= Little like that j-thing, only in Go
LICENSE= 2-clause-bsd
GO_SRCPATH= github.com/PuerkitoBio/goquery/
GO_DIST_BASE= ${GITHUB_PROJECT}-${PKGVERSION_NOREV}
.include "../../net/go-net/buildlink3.mk"
.include "../../lang/go/go-package.mk"
.include "../../mk/bsd.pkg.mk"

4
go-goquery/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $NetBSD$
@comment TODO: to fill this file with the file listing:
@comment TODO: 1. run "/usr/pkg/bin/bmake package"
@comment TODO: 2. run "/usr/pkg/bin/bmake print-PLIST"

15
go-goquery/buildlink3.mk Normal file
View File

@ -0,0 +1,15 @@
# $NetBSD$
BUILDLINK_TREE+= go-goquery
.if !defined(GO_GOQUERY_BUILDLINK3_MK)
GO_GOQUERY_BUILDLINK3_MK:=
BUILDLINK_CONTENTS_FILTER.go-goquery= ${EGREP} gopkg/
BUILDLINK_DEPMETHOD.go-goquery?= build
BUILDLINK_API_DEPENDS.go-goquery+= go-goquery>=1.6.0
BUILDLINK_PKGSRCDIR.go-goquery?= ../../wip/go-goquery
.endif # GO_GOQUERY_BUILDLINK3_MK
BUILDLINK_TREE+= -go-goquery

6
go-goquery/distinfo Normal file
View File

@ -0,0 +1,6 @@
$NetBSD$
SHA1 (go-goquery-1.6.0.tar.gz) = ad6ce310b6246d2915195be6c3906c4eb6978c21
RMD160 (go-goquery-1.6.0.tar.gz) = 0bcec58a4d8c8d8377c38ea1de12d839623924f3
SHA512 (go-goquery-1.6.0.tar.gz) = 6ce6ab2361e10f7af21bd579cc4a959f717ca32581f74cf5c747556873bbbc862e3f93fbab27543e13abb2e2c52b2679d66d68a24776b5bb3a851277351093f7
Size (go-goquery-1.6.0.tar.gz) = 102842 bytes