Skip to content

Commit

Permalink
Vendoring
Browse files Browse the repository at this point in the history
  • Loading branch information
strokyl committed Feb 9, 2024
1 parent b373638 commit 47e78d0
Show file tree
Hide file tree
Showing 213 changed files with 42,707 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.0.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v2.0.3","Time":"2023-10-10T18:05:46Z","Origin":{"VCS":"git","URL":"https://github.com/cpuguy83/go-md2man","Hash":"f67b5f6400a3ea2156517041a329ae5f5935395c","Ref":"refs/tags/v2.0.3"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/cpuguy83/go-md2man/v2

go 1.11

require github.com/russross/blackfriday/v2 v2.1.0
1 change: 1 addition & 0 deletions pkg/mod/cache/download/github.com/ghodss/yaml/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v1.0.0","Time":"2017-03-27T23:54:44Z"}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/ghodss/yaml
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v1.1.0","Time":"2022-11-27T22:01:53Z","Origin":{"VCS":"git","URL":"https://github.com/inconshreveable/mousetrap","Hash":"4e8053ee7ef85a6bd26368364a6d27f1641c1d21","Ref":"refs/tags/v1.1.0"}}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/inconshreveable/mousetrap

go 1.18
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v2.1.0","Time":"2020-10-27T03:47:54Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/russross/blackfriday/v2
1 change: 1 addition & 0 deletions pkg/mod/cache/download/github.com/spf13/cobra/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v1.8.0","Time":"2023-11-02T15:23:08Z","Origin":{"VCS":"git","URL":"https://github.com/spf13/cobra","Hash":"a0a6ae020bb3899ff0276067863e50523f897370","Ref":"refs/tags/v1.8.0"}}
Empty file.
10 changes: 10 additions & 0 deletions pkg/mod/cache/download/github.com/spf13/cobra/@v/v1.8.0.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/spf13/cobra

go 1.15

require (
github.com/cpuguy83/go-md2man/v2 v2.0.3
github.com/inconshreveable/mousetrap v1.1.0
github.com/spf13/pflag v1.0.5
gopkg.in/yaml.v3 v3.0.1
)
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
1 change: 1 addition & 0 deletions pkg/mod/cache/download/github.com/spf13/pflag/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v1.0.5","Time":"2019-09-18T19:59:20Z"}
Empty file.
3 changes: 3 additions & 0 deletions pkg/mod/cache/download/github.com/spf13/pflag/@v/v1.0.5.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/spf13/pflag

go 1.12
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/check.v1/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.0.0-20161208181325-20d25e280405
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v0.0.0-20161208181325-20d25e280405","Time":"2016-12-08T18:13:25Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module gopkg.in/check.v1
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v2/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.4.0
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.4.0.info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v2.4.0","Time":"2020-11-17T15:46:20Z"}
Empty file.
5 changes: 5 additions & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.4.0.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module gopkg.in/yaml.v2

go 1.15

require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
Binary file not shown.
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.4.0.ziphash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v3/@v/list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v3.0.1
1 change: 1 addition & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"v3.0.1","Time":"2022-05-27T08:35:30Z"}
5 changes: 5 additions & 0 deletions pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module "gopkg.in/yaml.v3"

require (
"gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405
)
20 changes: 20 additions & 0 deletions pkg/mod/github.com/ghodss/yaml@v1.0.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OSX leaves these everywhere on SMB shares
._*

# Eclipse files
.classpath
.project
.settings/**

# Emacs save files
*~

# Vim-related files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist

# Go test binaries
*.test
7 changes: 7 additions & 0 deletions pkg/mod/github.com/ghodss/yaml@v1.0.0/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: go
go:
- 1.3
- 1.4
script:
- go test
- go build
50 changes: 50 additions & 0 deletions pkg/mod/github.com/ghodss/yaml@v1.0.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
The MIT License (MIT)

Copyright (c) 2014 Sam Ghods

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Copyright (c) 2012 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
121 changes: 121 additions & 0 deletions pkg/mod/github.com/ghodss/yaml@v1.0.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# YAML marshaling and unmarshaling support for Go

[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml)

## Introduction

A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs.

In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/).

## Compatibility

This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility).

## Caveats

**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example:

```
BAD:
exampleKey: !!binary gIGC
GOOD:
exampleKey: gIGC
... and decode the base64 data in your code.
```

**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys.

## Installation and usage

To install, run:

```
$ go get github.com/ghodss/yaml
```

And import using:

```
import "github.com/ghodss/yaml"
```

Usage is very similar to the JSON library:

```go
package main

import (
"fmt"

"github.com/ghodss/yaml"
)

type Person struct {
Name string `json:"name"` // Affects YAML field names too.
Age int `json:"age"`
}

func main() {
// Marshal a Person struct to YAML.
p := Person{"John", 30}
y, err := yaml.Marshal(p)
if err != nil {
fmt.Printf("err: %v\n", err)
return
}
fmt.Println(string(y))
/* Output:
age: 30
name: John
*/

// Unmarshal the YAML back into a Person struct.
var p2 Person
err = yaml.Unmarshal(y, &p2)
if err != nil {
fmt.Printf("err: %v\n", err)
return
}
fmt.Println(p2)
/* Output:
{John 30}
*/
}
```

`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available:

```go
package main

import (
"fmt"

"github.com/ghodss/yaml"
)

func main() {
j := []byte(`{"name": "John", "age": 30}`)
y, err := yaml.JSONToYAML(j)
if err != nil {
fmt.Printf("err: %v\n", err)
return
}
fmt.Println(string(y))
/* Output:
name: John
age: 30
*/
j2, err := yaml.YAMLToJSON(y)
if err != nil {
fmt.Printf("err: %v\n", err)
return
}
fmt.Println(string(j2))
/* Output:
{"age":30,"name":"John"}
*/
}
```
Loading

0 comments on commit 47e78d0

Please sign in to comment.