1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 06:56:29 +00:00

vendor change

This commit is contained in:
kinarashah
2019-09-25 19:31:01 -07:00
committed by Alena Prokharchyk
parent 5153dfd8b8
commit 88449ec73b
596 changed files with 95933 additions and 113274 deletions

View File

@@ -1,14 +1,10 @@
language: go
matrix:
include:
- go: 1.4.x
- go: 1.5.x
- go: 1.6.x
- go: 1.7.x
- go: 1.8.x
- go: 1.9.x
- go: 1.10.x
- go: 1.11.x
- go: 1.4.3
- go: 1.5.4
- go: 1.6.3
- go: 1.7
- go: tip
allow_failures:
- go: tip
@@ -17,7 +13,7 @@ install:
- go get github.com/mattn/goveralls
script:
- echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci
-repotoken=$COVERALLS_TOKEN
-repotoken $COVERALLS_TOKEN
- echo "Build examples" ; cd examples && go build
- echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .)
env:

View File

@@ -1,4 +1,4 @@
semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.svg)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/blang/semver)](https://goreportcard.com/report/github.com/blang/semver)
semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master)
======
semver is a [Semantic Versioning](http://semver.org/) library written in golang. It fully covers spec version `2.0.0`.
@@ -83,8 +83,8 @@ Range usage:
```
v, err := semver.Parse("1.2.3")
expectedRange, err := semver.ParseRange(">1.0.0 <2.0.0 || >=3.0.0")
if expectedRange(v) {
range, err := semver.ParseRange(">1.0.0 <2.0.0 || >=3.0.0")
if range(v) {
//valid
}

View File

@@ -1 +0,0 @@
module github.com/blang/semver

View File

@@ -327,7 +327,7 @@ func expandWildcardVersion(parts [][]string) ([][]string, error) {
for _, p := range parts {
var newParts []string
for _, ap := range p {
if strings.Contains(ap, "x") {
if strings.Index(ap, "x") != -1 {
opStr, vStr, err := splitComparatorVersion(ap)
if err != nil {
return nil, err

View File

@@ -26,7 +26,7 @@ type Version struct {
Minor uint64
Patch uint64
Pre []PRVersion
Build []string //No Precedence
Build []string //No Precendence
}
// Version to string
@@ -161,36 +161,6 @@ func (v Version) Compare(o Version) int {
}
// IncrementPatch increments the patch version
func (v *Version) IncrementPatch() error {
if v.Major == 0 {
return fmt.Errorf("Patch version can not be incremented for %q", v.String())
}
v.Patch += 1
return nil
}
// IncrementMinor increments the minor version
func (v *Version) IncrementMinor() error {
if v.Major == 0 {
return fmt.Errorf("Minor version can not be incremented for %q", v.String())
}
v.Minor += 1
v.Patch = 0
return nil
}
// IncrementMajor increments the major version
func (v *Version) IncrementMajor() error {
if v.Major == 0 {
return fmt.Errorf("Major version can not be incremented for %q", v.String())
}
v.Major += 1
v.Minor = 0
v.Patch = 0
return nil
}
// Validate validates v and returns error in case
func (v Version) Validate() error {
// Major, Minor, Patch already validated using uint64
@@ -232,21 +202,14 @@ func Make(s string) (Version, error) {
// ParseTolerant allows for certain version specifications that do not strictly adhere to semver
// specs to be parsed by this library. It does so by normalizing versions before passing them to
// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions
// with only major and minor components specified, and removes leading 0s.
// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions
// with only major and minor components specified
func ParseTolerant(s string) (Version, error) {
s = strings.TrimSpace(s)
s = strings.TrimPrefix(s, "v")
// Split into major.minor.(patch+pr+meta)
parts := strings.SplitN(s, ".", 3)
// Remove leading zeros.
for i, p := range parts {
if len(p) > 1 {
parts[i] = strings.TrimPrefix(p, "0")
}
}
// Fill up shortened versions.
if len(parts) < 3 {
if strings.ContainsAny(parts[len(parts)-1], "+-") {
return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data")
@@ -254,8 +217,8 @@ func ParseTolerant(s string) (Version, error) {
for len(parts) < 3 {
parts = append(parts, "0")
}
s = strings.Join(parts, ".")
}
s = strings.Join(parts, ".")
return Parse(s)
}

View File

@@ -14,7 +14,7 @@ func (v *Version) Scan(src interface{}) (err error) {
case []byte:
str = string(src)
default:
return fmt.Errorf("version.Scan: cannot convert %T to string", src)
return fmt.Errorf("Version.Scan: cannot convert %T to string.", src)
}
if t, err := Parse(str); err == nil {