Skip to content

Commit

Permalink
fix: solved the problem that the pod-lens crashes when the inoput is …
Browse files Browse the repository at this point in the history
…empty (#35)

* fix: solved the problem that the pod-lens crashes when the inoput is  empty
  • Loading branch information
sunny0826 authored Feb 10, 2023
1 parent 6d3c644 commit 1f85e6c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ jobs:
kubectl get pods -n kube-system
echo "current-context:" $(kubectl config current-context)
- name: Test kube-system
- name: Test Interactive
run: |
echo "********************************************************************************"
echo "Test kube-system..."
echo "Test Installation..."
echo "********************************************************************************"
bin/pod-lens kube-apiserver-kind-control-plane -n kube-system
kubectl create deployment nginx --image=nginx
bin/pod-lens
- name: Test Deployments
run: |
Expand Down
13 changes: 13 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@ archives:
format_overrides:
- goos: windows
format: zip
# .goreleaser.yml
changelog:
use: github
abbrev: -1
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?bug(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
2 changes: 1 addition & 1 deletion pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (sf *SnifferPlugin) findPodByName(name, namespace string) error {
name + "], please check your parameters, set a context or verify API server.")
}

if name[len(name)-1:] == "*" {
if len(name) != 0 && name[len(name)-1:] == "*" {
name = name[:len(name)-1]
}

Expand Down

0 comments on commit 1f85e6c

Please sign in to comment.