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

Go: An Introduction

Go: An Introduction

An introduction to the Go programming language. Deck was created for and targeted at a lunch and learn for developers at Blackstone Media (http://www.blackstonemedia.com/) and StarkNine (http://www.starknine.com/) in Louisville, KY.

Referenced Links:
- https://github.com/slogsdon/b (for code walkthrough)
- http://golang.org/
- http://tour.golang.org/
- http://godoc.org/

Presentation can be viewed at http://youtu.be/SI-okTfauyw

Shane Logsdon

June 06, 2014
Tweet

More Decks by Shane Logsdon

Other Decks in Programming

Transcript

  1. An Introduction
    Shane Logsdon
    Go  

    View Slide

  2. Why Use Go
    •  Standard Library
    •  Tooling
    •  Compiling
    •  Concurrency
    •  Deployment
    •  And more

    View Slide

  3. Standard Library
    •  Provides large chunk of necessary
    functionality
    •  encoding/json & encoding/xml
    •  flag
    •  io/ioutil
    •  net/http
    •  net/http/httptest
    •  testing
    •  Etc.
    •  External libraries offer convenience

    View Slide

  4. Tooling
    •  go fmt
    •  go test
    •  go doc
    •  Community supplied

    View Slide

  5. Compiling
    •  Compilation within seconds
    •  No waiting for VM to spin up
    •  Target multiple platforms with cross
    compilation
    •  Increase development efficiency

    View Slide

  6. Concurrency
    •  Goroutines
    •  lightweight asynchronous “processes”
    •  Channels
    •  transfer data between goroutines
    •  Example
    •  server handles individual requests in separate
    goroutines

    View Slide

  7. Deployment
    •  Can be single binary file
    •  Built for host platform and OS
    •  Quick compile process -> build on host
    •  Easy integration with CI/CD services

    View Slide

  8. Basic Overview
    (with examples)

    View Slide

  9. Basic Overview
    Variables

    View Slide

  10. Basic Overview
    Exported/Unexported

    View Slide

  11. Basic Overview
    Error Checking

    View Slide

  12. Basic Overview
    Struct Composition

    View Slide

  13. Basic Overview
    Interfaces

    View Slide

  14. Basic Overview
    Goroutines

    View Slide

  15. Basic Overview
    Channels

    View Slide

  16. Code Walkthrough
    https://github.com/slogsdon/b

    View Slide

  17. See Also
    •  golang.org
    •  tour.golang.org
    •  godoc.org

    View Slide

  18. Questions?
    Twitter: @shanelogsdon
    GitHub: @slogsdon
    Thanks  

    View Slide