Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Apr 29, 2024
1 parent 8c34c76 commit c7b8a9f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c7b8a9f

Please sign in to comment.