From a9210487fa5fcf623e4345055aaa6c9def288d80 Mon Sep 17 00:00:00 2001 From: Siege Lion <1448189829@qq.com> Date: Wed, 15 Jun 2022 00:29:16 +0800 Subject: [PATCH] Fix: add handle of ".yml" type in readviewfile function (#4172) handle of files of type ".yml" is ignored in the original function Signed-off-by: HanMengnan <1448189829@qq.com> --- pkg/addon/addon.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/addon/addon.go b/pkg/addon/addon.go index 9b1e651be..6548956b2 100644 --- a/pkg/addon/addon.go +++ b/pkg/addon/addon.go @@ -422,9 +422,10 @@ func readViewFile(a *InstallPackage, reader AsyncReader, readPath string) error switch filepath.Ext(filename) { case ".cue": a.CUEViews = append(a.CUEViews, ElementFile{Data: b, Name: filepath.Base(readPath)}) - case ".yaml": + case ".yaml", ".yml": a.YAMLViews = append(a.YAMLViews, ElementFile{Data: b, Name: filepath.Base(readPath)}) default: + // skip other file formats } return nil }