• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / kubebuilder / 12940175224

23 Jan 2025 11:40PM UTC coverage: 74.149%. Remained the same
12940175224

Pull #4522

github

web-flow
:seedling: Bump sigs.k8s.io/controller-runtime in /testdata/project-v4

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.20.0...v0.20.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #4522: :seedling: Bump sigs.k8s.io/controller-runtime from 0.20.0 to 0.20.1 in /testdata/project-v4

2309 of 3114 relevant lines covered (74.15%)

14.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/plugin/util/stdin.go
1
/*
2
Copyright 2018 The Kubernetes Authors.
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package util
18

19
import (
20
        "bufio"
21
        "fmt"
22
        "log"
23
        "strings"
24
)
25

26
// YesNo reads from stdin looking for one of "y", "yes", "n", "no" and returns
27
// true for "y" and false for "n"
28
func YesNo(reader *bufio.Reader) bool {
×
29
        for {
×
30
                text := readstdin(reader)
×
31
                switch text {
×
32
                case "y", "yes":
×
33
                        return true
×
34
                case "n", "no":
×
35
                        return false
×
36
                default:
×
37
                        fmt.Printf("invalid input %q, should be [y/n]", text)
×
38
                }
39
        }
40
}
41

42
// Readstdin reads a line from stdin trimming spaces, and returns the value.
43
// log.Fatal's if there is an error.
44
func readstdin(reader *bufio.Reader) string {
×
45
        text, err := reader.ReadString('\n')
×
46
        if err != nil {
×
47
                log.Fatalf("Error when reading input: %v", err)
×
48
        }
×
49
        return strings.TrimSpace(text)
×
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc