Skip to content

Commit

Permalink
Update pkg/kn/commands/flags/sink.go
Browse files Browse the repository at this point in the history
Co-authored-by: Murugappan Chetty <[email protected]>
  • Loading branch information
Abirdcfly and itsmurugappan authored Aug 18, 2021
1 parent 4356ea6 commit 19f270a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kn/commands/flags/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func parseSink(sink string) (string, string, string) {
// SinkToString prepares a sink for list output
func SinkToString(sink duckv1.Destination) string {
if sink.Ref != nil {
if sink.Ref.Kind == "Service" && strings.Contains(sink.Ref.APIVersion, sinkMappings["ksvc"].Group) {
if sink.Ref.Kind == "Service" && strings.HasPrefix(sink.Ref.APIVersion, sinkMappings["ksvc"].Group) {
return fmt.Sprintf("ksvc:%s", sink.Ref.Name)
} else {
return fmt.Sprintf("%s:%s", strings.ToLower(sink.Ref.Kind), sink.Ref.Name)
Expand Down

0 comments on commit 19f270a

Please sign in to comment.