diff options
author | techknowlogick <techknowlogick@gitea.io> | 2021-07-24 07:00:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 13:00:41 +0200 |
commit | 29a22ade82f516d078811d5fbcaf821043a09d8c (patch) | |
tree | 972a75bc52c2244673ced4933a51827a0a75ef3b /vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md | |
parent | 5d2e11eedb837f26d13e3b904583730cd8492fbd (diff) | |
download | gitea-29a22ade82f516d078811d5fbcaf821043a09d8c.tar.gz gitea-29a22ade82f516d078811d5fbcaf821043a09d8c.zip |
switch to maintained lib (#16532)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md')
-rw-r--r-- | vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md b/vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md new file mode 100644 index 0000000000..c4efbd2a8c --- /dev/null +++ b/vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md @@ -0,0 +1,22 @@ +## Migration Guide (v3.2.1) + +Starting from [v3.2.1](https://github.com/golang-jwt/jwt/releases/tag/v3.2.1]), the import path has changed from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt`. Future releases will be using the `github.com/golang-jwt/jwt` import path and continue the existing versioning scheme of `v3.x.x+incompatible`. Backwards-compatible patches and fixes will be done on the `v3` release branch, where as new build-breaking features will be developed in a `v4` release, possibly including a SIV-style import path. + +### go.mod replacement + +In a first step, the easiest way is to use `go mod edit` to issue a replacement. + +``` +go mod edit -replace github.com/dgrijalva/jwt-go=github.com/golang-jwt/jwt@v3.2.1+incompatible +go mod tidy +``` + +This will still keep the old import path in your code but replace it with the new package and also introduce a new indirect dependency to `github.com/golang-jwt/jwt`. Try to compile your project; it should still work. + +### Cleanup + +If your code still consistently builds, you can replace all occurences of `github.com/dgrijalva/jwt-go` with `github.com/golang-jwt/jwt`, either manually or by using tools such as `sed`. Finally, the `replace` directive in the `go.mod` file can be removed. + +## Older releases (before v3.2.0) + +The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md.
\ No newline at end of file |