Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What will happen when you enable go modules on the legacy Go projects

What will happen when you enable go modules on the legacy Go projects

Talking in Golang Meetup 56 by Evan Lin https://www.meetup.com/golang-taipei-meetup/events/277374228/

7975b9fd58c8945ae1c6b38747de7f28?s=128

line_developers_tw2

April 27, 2021
Tweet

Transcript

  1. What will happen when you enable go modules on the

    legacy Go projects LINE Developer Relations Evan Lin 2021.04
  2. Evan Lin • LINE Developer Meetup • LINE TAIWAN TECHPULSE

    Organizer • GDE, Golang lover LINE Technology Evangelist
  3. Agenda •How to enable Go Modules •Problem? •How to fix?

    •Summary
  4. LINE-Bot-SDK in Go (created 5 years ago)

  5. Let’s Enable “Go Modules” •go mod init •go mod tidy

    •go mod vendor •搭啦!! (Magic!)
  6. Problem1: Cannot update version

  7. Problem2: No new version on pkg.go.dev

  8. How to fix it (package)

  9. How to fix it (application)

  10. Summary •After version 2, remember to update your `go.mod` file

    after increase major version. •If you have used github.com/line/line-bot- sdk-go, please to update your code.
  11. LINE Developer Recruitment Day https://linegroup.kktix.cc/events/20210522-devel

  12. None