Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

simPod/WTFGo

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

WTF Go

While learning about golang, I stubled upon many things that don't make much sense compared to other languages. The language has IMO high WTF factor. I want to list those WTFs so it either reminds me to get understanding of it or to serve as a strawman so I don't get tempted to touch the language.

#crymeariver

Missing access modifiers

type memberInfo struct { means private access (only accessible within single package)

type MemberInfo struct { means public access (accessible from other packages)

Where are access modifiers?!

Switch-case Indent

Is this a proper indentation for switch case? Why reinvent something that works... The outcome is definitelly worse.

switch i {
case 1:
    fmt.Println("one")
case 2:
    fmt.Println("two")
case 3:
    fmt.Println("three")
}

Seems like it's the reason why it can't be collapsed

Dreaming about collapsing switch statement

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.