From c7b8a9f786848777fde9f666d7f45ddc9a83c01a Mon Sep 17 00:00:00 2001 From: "Lixia (Sylvia) Lei" Date: Mon, 29 Apr 2024 12:11:56 +0800 Subject: [PATCH] refactor Signed-off-by: Lixia (Sylvia) Lei --- MIGRATION_GUIDE.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 3e722862..f88e8f46 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -25,29 +25,28 @@ In version `v2`, ORAS Go library has been completely refreshed with: ## Migrating from `v1` to `v2` -1. Update Go dependencies: - - Get the `v2` package: +1. Get the `v2` package ```sh go get oras.land/oras-go/v2 ``` - - Incorporate the `v2` package in your project: +2. Import and use the `v2` package ```go import "oras.land/oras-go/v2" ``` - - Run: +3. Run - ```sh - go mod tidy + ```sh + go mod tidy ``` -2. Refactor your code: - - Since breaking changes are introduced in `v2`, code refactoring is required for migrating from `v1` to `v2`. - - The migration can be done in an iterative fashion, as `v1` and `v2` can be imported and used at the same time. - - For comprehensive documentation and examples, please refer to [pkg.go.dev](https://pkg.go.dev/oras.land/oras-go/v2). +Since breaking changes are introduced in `v2`, code refactoring is required for migrating from `v1` to `v2`. +The migration can be done in an iterative fashion, as `v1` and `v2` can be imported and used at the same time. + +For comprehensive documentation and examples, please refer to [pkg.go.dev](https://pkg.go.dev/oras.land/oras-go/v2). ## FAQs