Skip to content

Instantly share code, notes, and snippets.

View zachvictor's full-sized avatar

Zach Victor zachvictor

View GitHub Profile
@maratori
maratori / golang-mocks.md
Last active April 15, 2025 05:19
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2025-04-13

[gomock][1] [testify][2] + [mockery][3] [mockio][4] [minimock][5] [moq][6]

Library

GitHub stars [![s1]][1] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s6]][6]
Latest release date [![d1]][r1] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d6]][r6]
Maintained
@veber-alex
veber-alex / py_result.py
Created May 15, 2021 20:06
Python Result type simulating Rust's Result enum.
from typing import Generic, Optional, TypeVar
from abc import ABC, abstractmethod
from dataclasses import dataclass
T = TypeVar('T')
E = TypeVar('E')
class Result(Generic[T, E], ABC):
@abstractmethod