//takes a patternfile and returns the status of its current support by using dry run
takes a patternfile and returns the status of its current support by using dry run
// takes a patternfile and returns the status of its current support by using dry run
func (mc *ContentModifier) isPatternSupported(patternfile string) (msg string, ok bool) {
	var pattern map[string]interface{}
	err := yaml.Unmarshal([]byte(patternfile), &pattern)
	if err != nil {
		return err.Error(), false
	}
	patternFile, err := core.NewPatternFile([]byte(patternfile))
	if err != nil {
		return err.Error(), false
	}
	if mc.prefObj == nil || mc.prefObj.K8SConfig == nil || mc.prefObj.K8SConfig.Config == nil {
		return "could not detect kube config from preference", false
	}
	kc, err := meshkube.New(mc.prefObj.K8SConfig.Config) 
	if err != nil {
		return err.Error(), false
	}
	msg, err = _processPattern(
		mc.token,
		mc.provider,
		patternFile,
		mc.prefObj,
		kc,
		mc.userID,
		false,
		true,
		true,
	)
	if err != nil {
		return err.Error(), false
	}
	return msg, true
}
func ( mc * ContentModifier ) isPatternSupported ( patternfile string ) ( msg string , ok bool ) { var pattern map [ string ] interface { } err := yaml . Unmarshal ( [ ] byte ( patternfile ) , & pattern ) if err != nil { return err . Error ( ) , false } patternFile , err := core . NewPatternFile ( [ ] byte ( patternfile ) ) if err != nil { return err . Error ( ) , false } if mc . prefObj == nil || mc . prefObj . K8SConfig == nil || mc . prefObj . K8SConfig . Config == nil { return " " , false } kc , err := meshkube . New ( mc . prefObj . K8SConfig . Config ) if err != nil { return err . Error ( ) , false } msg , err = _processPattern ( mc . token , mc . provider , patternFile , mc . prefObj , kc , mc . userID , false , true , true , ) if err != nil { return err . Error ( ) , false } return msg , true }
takes a patternfile and returns the status of its current support by using dry run
takes a patternfile and returns the status of its current support by using dry run
//possible nil dereference