Ptt-official-app / Ptt-backend

PTT APP 的後端
BSD 3-Clause "New" or "Revised" License
208 stars 68 forks source link

jwt 切換套件 #264

Closed y2468101216 closed 3 years ago

y2468101216 commented 3 years ago

👏 解決掉的 issue / Resolved Issues

⛏ 變更內容 / Details of Changes

修改 go.mod 切換套件 修改使用到的 code

codecov-commenter commented 3 years ago

Codecov Report

Merging #264 (dbc44f7) into development (fbd1285) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           development     #264   +/-   ##
============================================
  Coverage        44.49%   44.49%           
============================================
  Files               29       29           
  Lines             1661     1661           
============================================
  Hits               739      739           
  Misses             819      819           
  Partials           103      103           
Impacted Files Coverage Δ
internal/usecase/token.go 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fbd1285...dbc44f7. Read the comment docs.

y2468101216 commented 3 years ago

看起來新版的 jwt 只支援 go 1.15 以上

github.com/golang-jwt/jwt/v4

Error: ../../../go/pkg/mod/github.com/golang-jwt/jwt/v4@v4.0.0/ecdsa.go:135:4: r.FillBytes undefined (type big.Int has no field or method FillBytes) Error: ../../../go/pkg/mod/github.com/golang-jwt/jwt/v4@v4.0.0/ecdsa.go:136:4: s.FillBytes undefined (type big.Int has no field or method FillBytes) note: module requires Go 1.15

PichuChen commented 3 years ago

不留著支援1.15嗎?

y2468101216 commented 3 years ago

不留著支援1.15嗎?

趁這次機會直接升到1.16,把舊版相容問題處理掉

PichuChen commented 3 years ago

但是他可以同時支援1.15和1.16?

y2468101216 commented 3 years ago

但是他可以同時支援1.15和1.16?

我覺得不用特別向下相容至1.15

PichuChen commented 3 years ago

LGTM