1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

trim source url if its set to github.com/

This commit is contained in:
Asim Aslam
2020-02-06 18:34:16 +00:00
parent 92571db693
commit 512df2628f

View File

@ -247,8 +247,9 @@ func (k *kubernetes) Init(opts ...runtime.Option) error {
o(&k.options)
}
// trim the source prefix if its a git url
if strings.HasPrefix(k.options.Source, "github.com") {
return errors.New("invalid source provided to kubernetes runtime, expected docker image")
k.options.Source = strings.TrimPrefix(k.options.Source, "github.com/")
}
return nil