MCPcopy Create free account
hub / github.com/devspace-sh/devspace / validateRequire

Function validateRequire

pkg/devspace/config/versions/validate.go:138–158  ·  view source on GitHub ↗
(config *latest.Config)

Source from the content-addressed store, hash-verified

136}
137
138func validateRequire(config *latest.Config) error {
139 for index, plugin := range config.Require.Plugins {
140 if plugin.Name == "" {
141 return errors.Errorf("require.plugins[%d].name is required", index)
142 }
143 if plugin.Version == "" {
144 return errors.Errorf("require.plugins[%d].version is required", index)
145 }
146 }
147
148 for index, command := range config.Require.Commands {
149 if command.Name == "" {
150 return errors.Errorf("require.commands[%d].name is required", index)
151 }
152 if command.Version == "" {
153 return errors.Errorf("require.commands[%d].version is required", index)
154 }
155 }
156
157 return nil
158}
159
160func validatePipelines(config *latest.Config) error {
161 for name := range config.Pipelines {

Callers 1

ValidateFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected