2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-17 09:25:32 +00:00
cheat.sheets/sheets/_go/Operators
2017-05-28 21:17:32 +00:00

41 lines
972 B
Plaintext

// ### Arithmetic
// |Operator|Description|
// |--------|-----------|
// |`+` |addition |
// |`-` |subtraction|
// |`*` |multiplication|
// |`/` |quotient |
// |`%` |remainder |
// |`&` |bitwise and|
// |`|` |bitwise or |
// |`^` |bitwise xor|
// |`&^` |bit clear (and not)|
// |`<<` |left shift |
// |`>>` |right shift|
//
// ### Comparison
// |Operator|Description|
// |--------|-----------|
// |`==` |equal |
// |`!=` |not equal |
// |`<` |less than |
// |`<=` |less than or equal|
// |`>` |greater than|
// |`>=` |greater than or equal|
//
// ### Logical
// |Operator|Description|
// |--------|-----------|
// |`&&` |logical and|
// |`||` |logical or |
// |`!` |logical not|
//
// ### Other
// |Operator|Description|
// |--------|-----------|
// |`&` |address of / create pointer|
// |`*` |dereference pointer|
// |`<-` |send / receive operator (see 'Channels' below)|