Skip to content

Instantly share code, notes, and snippets.

@nik-don
nik-don / _test.md
Last active November 3, 2021 11:00
[Go Testing]
  • Test files end with _test.go

  • Use Log to print

Log formats its arguments using default formatting, analogous to Println, and records the text in the error log. For tests, the text will be printed only if the test fails or the -test.v flag is set.
For benchmarks, the text is always printed to avoid having performance depend on the value of the -test.v flag.

  • Useful:
@nik-don
nik-don / vimcheatsheet.md
Last active July 4, 2022 15:03
My VIM Cheat Sheet (Basic operations)

vimtutor > good starting place

commands are case sensitive!

i insert mode
esc to go normal mode
@nik-don
nik-don / info.md
Last active April 26, 2023 16:48
coding-challenge

Tips

  • Importing packages: Make sure you're familiar with importing packages such as strconv for type conversions and math for mathematical operations.

  • Type Conversions: Practice using strconv to convert between different types, such as strings and integers.

  • Math functions: Get comfortable with various math functions like square roots, rounding down with math.Floor, or rounding to the nearest integer using math.Round.

  • String Manipulation: Practice string manipulation techniques to handle and process strings effectively.