Homepage
Sign inGet started

Agrea

Agrea is a Go coding studio. We offer Go consultants world wide remotely and in person in Europe and India (at the moment).

  • Archive
  • About
  • agrea.io
  • Go to the profile of Sebastian Dahlgren
    Sebastian Dahlgren
    Jul 18, 2017

    Mocking time with Go

    Every now and then I find developers struggling with handling time in their tests, so I wanted to address that in this blog post. Typically there would be code that looks something like the below that needs to be tested:

    import (
    "fmt"
    "time"
    )
    Read more…
    Go to the profile of Sebastian Dahlgren
    Sebastian Dahlgren
    Jul 4, 2017

    Mocking dependencies in Go

    Overview

    We all use a lot of packages when constructing our applications, both internally developed and third party packages. This blog post will show how you can easily mock these packages using mockery and stretchr/testify/mock.

    Read more…
    3 responses
    Go to the profile of Sebastian Dahlgren
    Sebastian Dahlgren
    Jun 26, 2017

    Basic testing patterns in Go

    What should I test?

    What you need to test in Go is really not much different from any other programming language. Except maybe that you need to take extra care with pointers if you are not coming from that background. Generally I advocate…

    Read more…
    2 responses
    About AgreaLatest StoriesArchiveAbout MediumTermsPrivacy