Skip to content

Instantly share code, notes, and snippets.

@aroslov
Last active June 3, 2016 04:42
Show Gist options
  • Save aroslov/8679696dc30b516e88e0eeb9f471edbc to your computer and use it in GitHub Desktop.
Save aroslov/8679696dc30b516e88e0eeb9f471edbc to your computer and use it in GitHub Desktop.
go-swagger package migration
# script for automatic replacement of package paths as described in Migration section of https://github.com/go-swagger/go-swagger
for gofile in $(find . -name '*.go'); do
while read -r pattern replacement; do
echo "Replacing $pattern to $replacement in $gofile"
sed -i '' "s|$pattern|$replacement|g" $gofile
done < go-swagger-patterns.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment