Git Product home page Git Product logo

golang_gotchas's Introduction

golang gotchas

Anything I didn't know about golang and is somehow special to golang for me with programming background in Java, Python, Groovy, C, C++ and misc other programming languages

Maybe it helps others starting to use golang :-)

  1. acceptLanguage - Sample using golang.org/x/text/language to select the correct language from HTTP Accept-Language
  2. broadcastChan - Sample how to implement simple broadcasts
  3. compareMaps -Typical pitfall when comparing map elements
  4. copyStructs - Sample code using github.com/jinzhu/copier to copy structs
  5. debugHTTPClient - Sample code which uses httputil to get low level debugging of http clients
  6. errorMarshaling - Sample code hoe marshaling of errors works
  7. fetchUrls - Use gofuncs to execute get requests against a number of urls and calculate responsetime statistics
  8. github - Retrieve all public repositories of a github organization with a home grown client or a client using the google go-github library
  9. gorohttp - Simple sample code how to kick off http requests as fast as possible
  10. httpStress - More complex sample code how to kick off http requests as fast as possible
  11. httpClient - Sample how to use timeouts in a httpClient
  12. i18n - Sample code using github.com/nicksnyder/go-i18n/i18n to enable localization
  13. jsonMarshalling - Print the different marshal/unmarshal results of different structures into/from JSON
  14. logging - Sample code using go.uber.org/zap to create structured logs and use log hooks
  15. pointers - Sample code to demonstrate a common error using pointers in golang when you are used to use C or C++
  16. pollURLs - Golang pollURL sample code
  17. sigTerm - Catch SIGTERM or SIGINT to gracefully shutdown program
  18. templates - Sample code using golang /text/template
  19. utils
    1. json.go - pretty print JSON
  20. waitGroupTimeout - Sample which implements a waitGroup which can timeout

golang_gotchas's People

Contributors

framps avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.