Skip to content

Instantly share code, notes, and snippets.


Kunwardeep kunwardeep

  • Zendesk
  • melbourne
View GitHub Profile
kunwardeep /
Created October 2, 2020 06:14 — forked from posener/
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
kunwardeep / merge all commits
Last active January 30, 2019 00:21
Merge all commits from a branch into a single commit
View merge all commits
git checkout yourBranch
git reset $(git merge-base master $(git rev-parse --abbrev-ref HEAD))
git add -A
git commit -m "one commit on yourBranch"
git push --force