Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore common Go anti-patterns and learn how to write more idiomatic code in this 38-minute conference talk from GopherCon 2017. Delve into the concept of "Idiomatic Go" and discover why certain practices should be avoided. Examine topics such as simplicity, readability, tiny package syndrome, premature exportation, config structs, and asynchronous APIs. Gain insights on refactoring techniques to improve code quality and maintainability. Learn to recognize and avoid pitfalls like overuse of interfaces, excessive use of panic, and the interface{} type. Understand the importance of orthogonality in Go programming and how it contributes to writing cleaner, more efficient code.
Syllabus
Go Anti-patterns
Idiomatic Go
#2 Simplicity
#3 Readability
Anti-pattern: Tiny Package Syndrome
Anti-pattern: Premature Exportation
Anti-pattern: package util
Anti-pattern: Config Structs
Anti-pattern: context. Value
Anti-pattern: Asynchronous APIs
Anti-pattern: If - Then - Else
Anti-pattern: Panic In a Lib
Anti-pattern: Interface all the things
Anti-pattern: interface{}
Orthogonality
Taught by
Gopher Academy