Skip to content

Commit 179c251

Browse files
author
cloud-team-rebase-bot
committed
UPSTREAM: <drop>: Updating and vendoring go modules after an upstream rebase
1 parent 80cf126 commit 179c251

16,793 files changed

Lines changed: 5242817 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module k8s.io/cloud-provider-vsphere
22

3-
go 1.22
3+
go 1.26.0
4+
5+
replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20260502065817-4ee333ccd54c
46

57
// vm-operator version: prefer alignment with CAPV https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/go.mod#L11
68
// (may temporarily diverge when CPI needs a newer api/v1alpha6 commit before CAPV bumps).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
5+
6+
# Folders
7+
_obj
8+
_test
9+
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
13+
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
19+
20+
_testmain.go
21+
22+
*.exe
23+
*.test
24+
*.prof
25+
26+
.idea/
27+
28+
escargs
29+
30+
config.hcl
31+
32+
.DS_Store
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# run:
2+
# # timeout for analysis, e.g. 30s, 5m, default is 1m
3+
# timeout: 5m
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- bodyclose
9+
- dogsled
10+
- goconst
11+
- gocritic
12+
- gofmt
13+
- goimports
14+
- gosec
15+
- gosimple
16+
- govet
17+
- ineffassign
18+
- misspell
19+
- prealloc
20+
- exportloopref
21+
- revive
22+
- staticcheck
23+
- stylecheck
24+
- typecheck
25+
- unconvert
26+
- unparam
27+
- unused
28+
- misspell
29+
- wsl
30+
31+
issues:
32+
exclude-rules:
33+
- text: "Use of weak random number generator"
34+
linters:
35+
- gosec
36+
- text: "comment on exported var"
37+
linters:
38+
- golint
39+
- text: "don't use an underscore in package name"
40+
linters:
41+
- golint
42+
- text: "ST1003:"
43+
linters:
44+
- stylecheck
45+
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
46+
# https://github.com/dominikh/go-tools/issues/389
47+
- text: "ST1016:"
48+
linters:
49+
- stylecheck
50+
51+
linters-settings:
52+
dogsled:
53+
max-blank-identifiers: 3
54+
maligned:
55+
# print struct with more effective memory layout or not, false by default
56+
suggest-new: true
57+
58+
run:
59+
tests: false
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This is an example goreleaser.yaml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod download
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
- >-
13+
{{- if eq .Os "darwin" }}
14+
{{- if eq .Arch "amd64"}}CC=o64-clang{{- end }}
15+
{{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }}
16+
{{- end }}
17+
{{- if eq .Os "windows" }}
18+
{{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }}
19+
{{- end }}
20+
main: ./cmd/escargs
21+
goos:
22+
- linux
23+
- windows
24+
- darwin
25+
- freebsd
26+
goarch:
27+
- amd64
28+
- arm64
29+
- arm
30+
goarm:
31+
- 6
32+
- 7
33+
goamd64:
34+
- v2
35+
- v3
36+
ignore:
37+
- goos: darwin
38+
goarch: 386
39+
- goos: linux
40+
goarch: arm
41+
goarm: 7
42+
- goarm: mips64
43+
- gomips: hardfloat
44+
- goamd64: v4
45+
checksum:
46+
name_template: 'checksums.txt'
47+
snapshot:
48+
name_template: "{{ .Tag }}-next"
49+
changelog:
50+
sort: asc
51+
filters:
52+
exclude:
53+
- '^docs:'
54+
- '^test:'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Alessio Treglia <alessio@debian.org>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at alessio@debian.org. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Alessio Treglia
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
#!/usr/bin/make -f
3+
4+
VERSION := $(shell git describe)
5+
6+
all: build
7+
8+
build:
9+
go build -a -v
10+
11+
install:
12+
go install ./cmd/escargs
13+
14+
escargs: build
15+
go build -v \
16+
-ldflags="-X 'main.version=$(VERSION)'" \
17+
./cmd/escargs
18+
19+
clean:
20+
rm -rfv escargs
21+
22+
uninstall:
23+
rm -v $(shell go env GOPATH)/bin/escargs
24+
25+
.PHONY: build clean install uninstall
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
![Build](https://github.com/alessio/shellescape/workflows/Build/badge.svg)
2+
[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/alessio/shellescape?tab=overview)
3+
[![sourcegraph](https://sourcegraph.com/github.com/alessio/shellescape/-/badge.svg)](https://sourcegraph.com/github.com/alessio/shellescape)
4+
[![codecov](https://codecov.io/gh/alessio/shellescape/branch/master/graph/badge.svg)](https://codecov.io/gh/alessio/shellescape)
5+
[![Coverage](https://gocover.io/_badge/github.com/alessio/shellescape)](https://gocover.io/github.com/alessio/shellescape)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/alessio/shellescape)](https://goreportcard.com/report/github.com/alessio/shellescape)
7+
8+
# shellescape
9+
Escape arbitrary strings for safe use as command line arguments.
10+
## Contents of the package
11+
12+
This package provides the `shellescape.Quote()` function that returns a
13+
shell-escaped copy of a string. This functionality could be helpful
14+
in those cases where it is known that the output of a Go program will
15+
be appended to/used in the context of shell programs' command line arguments.
16+
17+
This work was inspired by the Python original package
18+
[shellescape](https://pypi.python.org/pypi/shellescape).
19+
20+
## Usage
21+
22+
The following snippet shows a typical unsafe idiom:
23+
24+
```go
25+
package main
26+
27+
import (
28+
"fmt"
29+
"os"
30+
)
31+
32+
func main() {
33+
fmt.Printf("ls -l %s\n", os.Args[1])
34+
}
35+
```
36+
_[See in Go Playground](https://play.golang.org/p/Wj2WoUfH_d)_
37+
38+
Especially when creating pipeline of commands which might end up being
39+
executed by a shell interpreter, it is particularly unsafe to not
40+
escape arguments.
41+
42+
`shellescape.Quote()` comes in handy and to safely escape strings:
43+
44+
```go
45+
package main
46+
47+
import (
48+
"fmt"
49+
"os"
50+
51+
"al.essio.dev/pkg/shellescape"
52+
)
53+
54+
func main() {
55+
fmt.Printf("ls -l %s\n", shellescape.Quote(os.Args[1]))
56+
}
57+
```
58+
_[See in Go Playground](https://go.dev/play/p/GeguukpSUTk)_
59+
60+
## The escargs utility
61+
__escargs__ reads lines from the standard input and prints shell-escaped versions. Unlinke __xargs__, blank lines on the standard input are not discarded.

0 commit comments

Comments
 (0)