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

More Decks by LINE Developers Taiwan

Other Decks in Technology

Transcript

  1. Go

    LINE Developer Relations
    Evan Lin
    2020.05

    View full-size 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 full-size slide

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

    View full-size slide

  4. My history background

    View full-size slide

  5. Windows Application Developer 10+

    View full-size slide

  6. Web application development
    Surveillance Smart Home

    View full-size slide

  7. Our Tech Stack. (before)

    View full-size slide

  8. My (ex) boss told me..


    I have secret tip..

    View full-size slide

  9. What is pokemon Go?

    View full-size slide

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

    View full-size slide

  11. gofmt / goimport

    View full-size slide


  12. ?
    • Forget import package

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  15. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

  18. Learn Go from LINE chatbot

    View full-size slide

  19. Why using chatbot as example?

    View full-size slide

  20. What is LINE Chatbot

    View full-size slide

  21. 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 full-size slide

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

    View full-size slide

  23. How to become Go GDE

    View full-size slide

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

    View full-size slide

  25. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  29. Attend COSCUP 2020

    View full-size slide

  30. Can’t get the ticket?

    View full-size slide

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

    View full-size slide

  32. 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 full-size slide

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

    View full-size slide