mirror of
https://github.com/sony/sonyflake.git
synced 2026-12-03 10:39:30 +00:00
Increase coverage (#42)
* Introduce mocking framework and increase coverage (#22) This change introduces two common golang patterns: - types: this will allow fine-tuned control over imported types by defining where they will be used and how - mock: this allows the generation of mock constructors, which allows for testing any individual path in a method by "injecting" a mock method which matches the expected type This change also increases test coverage to 100% Co-authored-by: Yoshiyuki Mineo <Yoshiyuki.Mineo@jp.sony.com> * gofmt --------- Co-authored-by: Bradley Boutcher <btboutcher@icloud.com>
This commit is contained in:
1 parent
cc94b60628
commit
597171da2e
4 files changed
+145
-6
No files matched your search
@@ -0,0 +1,8 @@
|
||||
// Package Types defines type signatures used throughout SonyFlake. This allows for
|
||||
// fine-tuned control over imports, and the ability to mock out imports as well
|
||||
package types
|
||||
|
||||
import "net"
|
||||
|
||||
// InterfaceAddrs defines the interface used for retrieving network addresses
|
||||
type InterfaceAddrs func() ([]net.Addr, error)
|
||||
Reference in new issue
Block a user