Skip to content

Instantly share code, notes, and snippets.

View ialidzhikov's full-sized avatar

Ismail Alidzhikov ialidzhikov

  • Sofia, Bulgaria
View GitHub Profile
@LucaBernstein
LucaBernstein / gardener-api-types-submodule-import-path-migration.sh
Last active February 19, 2026 05:55
Migration script for the introduction of a Go submodule for the Gardener API package
# Related Pull Request: https://github.com/gardener/gardener/pull/13536
# migrate type helper
find . -name '*.go' | xargs -I_ -P 8 sed -i -E 's%github.com/gardener/gardener/pkg/apis/(.*)/(helper|validation|conversion)%github.com/gardener/gardener/pkg/api/\1/\2%g' _
# migrate config helper
find . -name '*.go' | xargs -I_ -P 8 sed -i -E 's%github.com/gardener/gardener/pkg/([a-z]+)/apis/config/([a-z0-9]+)/(helper|validation|conversion)%github.com/gardener/gardener/pkg/api/config/\1/\2/\3%g' _
# migrate config types
find . -name '*.go' | xargs -I_ -P 8 sed -i -E 's%github.com/gardener/gardener/pkg/([a-z]+)/apis/config/([a-z0-9]+)%github.com/gardener/gardener/pkg/apis/config/\1/\2%g' _