func migrateLibraryEmbed(c *config.Config, f *rule.File) {
	for _, r := range f.Rules {
		if !isGoRule(r.Kind()) {
			continue
		}
		libExpr := r.Attr("library")
		if libExpr == nil || rule.ShouldKeep(libExpr) || r.Attr("embed") != nil {
			continue
		}
		r.DelAttr("library")
		r.SetAttr("embed", &bzl.ListExpr{List: []bzl.Expr{libExpr}})
	}
}
func migrateLibraryEmbed(c *config.Config, f *rule.File) {
	for _, r := range f.Rules {
		if !isGoRule(r.Kind()) {
			continue
		}
		libExpr := r.Attr("library")
		if libExpr == nil || rule.ShouldKeep(libExpr) || r.Attr("embed") != nil {
			continue
		}
		r.DelAttr("library")
		r.SetAttr("embed", &bzl.ListExpr{List: []bzl.Expr{libExpr}})
	}
}
func migrateLibraryEmbed ( c * config . Config , f * rule . File ) { for _ , r := range f . Rules { if ! isGoRule ( r . Kind ( ) ) { continue } libExpr := r . Attr ( " " ) if libExpr == nil || rule . ShouldKeep ( libExpr ) || r . Attr ( " " ) != nil { continue } r . DelAttr ( " " ) r . SetAttr ( " " , & bzl . ListExpr { List : [ ] bzl . Expr { libExpr } } ) } }
// migrateLibraryEmbed converts "library" attributes to "embed" attributes,
// preserving comments. This only applies to Go rules, and only if there is
// no keep comment on "library" and no existing "embed" attribute.
migrateLibraryEmbed converts library attributes to embed attributes preserving comments . This only applies to Go rules and only if there is no keep comment on library and no existing embed attribute .