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

Build LINE Bot with Go

Build LINE Bot with Go

Build your LINE Bot with Go by Evan Lin on DSC x GDE on 2020/05/07. Video on https://www.youtube.com/watch?v=60icDO767G8

LINE Developers Taiwan
PRO

May 07, 2020
Tweet

More Decks by LINE Developers Taiwan

Other Decks in Technology

Transcript

  1. Go

    LINE Developer Relations
    Evan Lin
    2020.05

    View Slide

  2. Agenda
    •Who am I? Why I learn Go?
    •What is Go?
    •Using Golang to build LINE Bot
    •How I became GDE?
    •LINE TECH FRESH
    •Q&A

    View Slide

  3. Evan Lin
    • Google Developer Expert
    • LINE Developer Meetup
    • LINE TAIWAN TECHPULSE Organizer
    LINE Technology Evangelist

    View Slide

  4. My history background

    View Slide

  5. Windows Application Developer 10+

    View Slide

  6. Web application development
    Surveillance Smart Home

    View Slide

  7. Our Tech Stack. (before)

    View Slide

  8. My (ex) boss told me..


    I have secret tip..

    View Slide

  9. What is pokemon Go?

    View Slide

  10. What is Go
    • Create by Google
    • Design by
    • Ken Thompson
    • Rob Pike
    • Robert Griesemer
    • Feature:
    • Compiled
    • Statically Typed
    • Garbage Collection

    View Slide

  11. Go is fast!

    View Slide

  12. gofmt / goimport

    View Slide


  13. ?
    • Forget import package

    • if else
    • Indent
    • Demo: https://play.golang.org/p/DD0r3d25E4C

    View Slide

  14. ”go test” save your time for testing
    https://play.golang.org/p/jynzyytYzhC https://play.golang.org/p/P_P_bmOqlCB

    View Slide

  15. “godoc” help you build documentation
    https://pkg.go.dev/github.com/kkdai/youtube?tab=doc

    View Slide

  16. Goroutine: https://play.golang.org/p/rjT7yXqft_C
    Unbuffered Channel: https://play.golang.org/p/zaNUS8IhzfT
    Buffered Channel:
    • https://tour.golang.org/concurrency/3
    • https://tour.golang.org/concurrency/4

    View Slide

  17. https://tour.golang.org/list
    “A tour for Go” to learn more detail.

    View Slide

  18. https://go-tour-zh-tw.appspot.com/basics/1
    (Wait a second…)

    View Slide

  19. Learn Go from LINE chatbot

    View Slide

  20. Why using chatbot as example?

    View Slide

  21. What is LINE Chatbot

    View Slide

  22. Create LINE Bot within 5 mins
    •Request channel for LINE Bot
    •Deploy LINE Bot server on Heroku
    •Change related setting on Channel
    •Go ! Online (video)
    •How to modify it? (video)

    View Slide

  23. Build advanced Chatbot in Go
    https://youtu.be/B9m_6brhkdc
    https://github.com/kkdai/LineBotPetNeedMe

    View Slide

  24. How to become Go GDE

    View Slide

  25. How I became Go GDE l learn Go
    • Blog post (weekly)
    • Write everything with Go
    • SHARE! SHARE! SHARE!! With everyone

    View Slide

  26. How to write more blog posts
    • Start from learning note.
    • TIL (Today I learn) is the best practice.
    • Writing is the best way to learn deeper.

    View Slide

  27. Writing everything with Go
    https://github.com/kkdai/project52

    View Slide

  28. Learn new Go features
    • Learn new features using `go get`
    • Learn from document
    • Write related into your language TIL.

    View Slide

  29. SHARE! SHARE! SHARE!!
    • Meetup/Conference approach learning
    • Share >>> Learn
    • Open mind

    View Slide

  30. Attend COSCUP 2020

    View Slide

  31. Can’t get the ticket?

    View Slide

  32. Conference Speaker is
    who cannot get ticket
    willing to share!
    - anonymous

    View Slide

  33. COSCUP 2020 CFP
    https://blog.coscup.org/2020/04/coscup-2020-cfp-is-now-open.html#go
    https://blog.coscup.org/2020/04/coscup-2020-cfp-is-now-open.html#chatbot

    View Slide

  34. LINE TECH FRESH
    https://engineering.linecorp.com/zh-hant/blog/tech-fresh-2020/

    View Slide

  35. View Slide

  36. Q&A

    View Slide