summaryrefslogtreecommitdiff
path: root/vendor/github.com/leodido
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-03-20 11:05:46 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-20 11:05:46 +0100
commit4096e7076a56d67c6926edc1b3acc5b9445af788 (patch)
treebdc2c17abd56561afd9ed79b8cc9679047bffd1d /vendor/github.com/leodido
parent[bugfix] Use account ID host as accDomain if 2nd webfinger lookup fails (#1630) (diff)
downloadgotosocial-4096e7076a56d67c6926edc1b3acc5b9445af788.tar.xz
[chore]: Bump github.com/go-playground/validator/v10 (#1637)
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.11.2 to 10.12.0. - [Release notes](https://github.com/go-playground/validator/releases) - [Commits](https://github.com/go-playground/validator/compare/v10.11.2...v10.12.0) --- updated-dependencies: - dependency-name: github.com/go-playground/validator/v10 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/leodido')
-rw-r--r--vendor/github.com/leodido/go-urn/.gitignore3
-rw-r--r--vendor/github.com/leodido/go-urn/.travis.yml16
-rw-r--r--vendor/github.com/leodido/go-urn/README.md28
-rw-r--r--vendor/github.com/leodido/go-urn/makefile38
4 files changed, 55 insertions, 30 deletions
diff --git a/vendor/github.com/leodido/go-urn/.gitignore b/vendor/github.com/leodido/go-urn/.gitignore
index 5bcf4bade..89d4bc55d 100644
--- a/vendor/github.com/leodido/go-urn/.gitignore
+++ b/vendor/github.com/leodido/go-urn/.gitignore
@@ -8,4 +8,5 @@
*.out
*.txt
-vendor/ \ No newline at end of file
+vendor/
+/removecomments \ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/.travis.yml b/vendor/github.com/leodido/go-urn/.travis.yml
deleted file mode 100644
index 21f348d65..000000000
--- a/vendor/github.com/leodido/go-urn/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-language: go
-
-go:
- - 1.13.x
- - 1.14.x
- - 1.15.x
- - tip
-
-before_install:
- - go get -t -v ./...
-
-script:
- - go test -race -coverprofile=coverage.txt -covermode=atomic
-
-after_success:
- - bash <(curl -s https://codecov.io/bash) \ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/README.md b/vendor/github.com/leodido/go-urn/README.md
index cc902ec0e..731eecbb5 100644
--- a/vendor/github.com/leodido/go-urn/README.md
+++ b/vendor/github.com/leodido/go-urn/README.md
@@ -1,4 +1,4 @@
-[![Build](https://img.shields.io/travis/leodido/go-urn/master.svg?style=for-the-badge)](https://travis-ci.org/leodido/go-urn) [![Coverage](https://img.shields.io/codecov/c/github/leodido/go-urn.svg?style=for-the-badge)](https://codecov.io/gh/leodido/go-urn) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/leodido/go-urn)
+[![Build](https://img.shields.io/circleci/build/github/leodido/go-urn?style=for-the-badge)](https://app.circleci.com/pipelines/github/leodido/go-urn) [![Coverage](https://img.shields.io/codecov/c/github/leodido/go-urn.svg?style=for-the-badge)](https://codecov.io/gh/leodido/go-urn) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/leodido/go-urn)
**A parser for URNs**.
@@ -52,4 +52,30 @@ no/19/urn:UrN:NSS__________________________________/-4 20000000 399 ns
---
+## Example
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/leodido/go-urn"
+)
+
+func main() {
+ var uid = "URN:foo:a123,456"
+
+ u, ok := urn.Parse([]byte(uid))
+ if !ok {
+ panic("error parsing urn")
+ }
+
+ fmt.Println(u.ID)
+ fmt.Println(u.SS)
+
+ // Output:
+ // foo
+ // a123,456
+}
+```
+
[![Analytics](https://ga-beacon.appspot.com/UA-49657176-1/go-urn?flat)](https://github.com/igrigorik/ga-beacon) \ No newline at end of file
diff --git a/vendor/github.com/leodido/go-urn/makefile b/vendor/github.com/leodido/go-urn/makefile
index 47026d509..2e482fa17 100644
--- a/vendor/github.com/leodido/go-urn/makefile
+++ b/vendor/github.com/leodido/go-urn/makefile
@@ -1,18 +1,37 @@
SHELL := /bin/bash
+RAGEL := ragel
+GOFMT := go fmt
+export GO_TEST=env GOTRACEBACK=all go test $(GO_ARGS)
+
+.PHONY: build
build: machine.go
+.PHONY: clean
+clean:
+ @rm -rf docs
+ @rm -f machine.go
+
+.PHONY: images
images: docs/urn.png
+.PHONY: removecomments
+removecomments:
+ @go build ./tools/removecomments
+
machine.go: machine.go.rl
- ragel -Z -G2 -e -o $@ $<
- @sed -i '/^\/\/line/d' $@
- @$(MAKE) -s file=$@ snake2camel
- @gofmt -w -s $@
+
+machine.go: removecomments
+
+machine.go:
+ $(RAGEL) -Z -G2 -e -o $@ $<
+ @./removecomments $@
+ $(MAKE) -s file=$@ snake2camel
+ $(GOFMT) $@
docs/urn.dot: machine.go.rl
@mkdir -p docs
- ragel -Z -e -Vp $< -o $@
+ $(RAGEL) -Z -e -Vp $< -o $@
docs/urn.png: docs/urn.dot
dot $< -Tpng -o $@
@@ -22,13 +41,8 @@ bench: *_test.go machine.go
go test -bench=. -benchmem -benchtime=5s ./...
.PHONY: tests
-tests: *_test.go machine.go
- go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./...
-
-.PHONY: clean
-clean:
- @rm -rf docs
- @rm -f machine.go
+tests: *_test.go
+ $(GO_TEST) ./...
.PHONY: snake2camel
snake2camel: