Fix for panic during channel list (#1568)

* Fix for panic during channel list

* Added changelog entry
This commit is contained in:
Gunjan Vyas 2022-01-13 18:37:12 +05:30 committed by GitHub
parent d8670f5762
commit f6434549da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -16,6 +16,11 @@
[cols="1,10,3", options="header", width="100%"]
|===
| | Description | PR
| 🐛
| Fixed panic in `kn channel list`
| https://github.com/knative/client/pull/1568[#1568]
| 🗑
| Remove deprecated Hugo frontmatter generation for docs
| https://github.com/knative/client/pull/1563[#1563]

View File

@ -56,7 +56,14 @@ func printChannel(channel *messagingv1.Channel, options hprinters.PrintOptions)
}
name := channel.Name
ctype := channel.Spec.ChannelTemplate.Kind
template := channel.Spec.ChannelTemplate
var ctype string
if template == nil {
ctype = ""
} else {
ctype = template.Kind
}
url := ""
if channel.Status.Address != nil {
url = channel.Status.Address.URL.String()