Johnny.sh

Notes on numbers and strings in go.

Types of Numbers

TODO

Types of Strings

  • single quote '你' - this is only used to declare a byte or a rune. There can only be one character inside here.
  • double quote "this is a string" - string literal. Respects escapings, like \n for new line.
  • backticks - these are called raw string literals, and behave kinda like JavaScript’s string template literals. Maintains white space and doesn’t honor escapings.

    `this is
    a raw
    
      string literal
    `
Last modified: September 20, 2021
/about
/uses
/notes
/talks
/projects
/podcasts
/reading-list
/spotify
© 2024