Coder Social home page Coder Social logo

go-gems's Introduction

Go Programming Gems and Classic Problems

The goal is to compile hidden gems and off-the-beaten path Go features and patterns. This is not meant to be a library or reference implementation.

Gems and Off-the-beaten Path

  • closures

    A dramatic example of Go Closures. A two-level closure pattern.

  • composite_literals

    It is important to understand what composite literals mean in Go through some interesting use-cases

  • for_with_label

    For loops can have break and continue statements with labels. This is a useful but less well-known feature.

  • runes_bytes_loops

    A must-understand for serious programmers. Simple program demonstrating tricky concepts. Do you know that 'a' is a int32, str[0] is a uint8, the value of position 0 in a range loop is a rune?

  • slice_gotchas

Do you know that this does not cause an out of bounds error?

	c := make([]int, 3)
	fmt.Println(c[len(c):len(c)])
  • slice_tricks

    Implementation of simple functions that demonstrate interesting slice operations such as extending, expanding and inserting elements.

  • strings_in_depth

    Let's look under the hood and see how strings are represented in Go and print a string by walking the memory addresses, C-style.

  • variadic_functions

    Variadic functions in Go are certainly off-the-beaten path. One hidden gem is interface{} variadic functions

Classic Problems

go-gems's People

Contributors

benderscript avatar

Stargazers

 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.