O'Reilly logo

Go: Design Patterns for Real-World Projects by Mat Ryer, Mario Castro Contreras, Vladimir Vivien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Operators

The operators are used to perform arithmetic operations and make comparisons between many things. The following operators are reserved by Go language.

Operators

Most commonly used operators are the arithmetic operators and comparators. Arithmetic operators are as following:

  • The + operator for sums
  • The - operator for subtractions
  • The * operator for multiplications
  • The / operator for divisions
  • The % operator for division remainders
  • The ++ operator to add 1 to the current variable
  • The -- operator to subtract 1 to the current variable

On the other side, comparators are used to check the differences between two statements:

  • The == operator to check if two values ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required