aboutsummaryrefslogtreecommitdiff
path: root/pipe/pipe_test.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 19:13:41 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 19:16:35 +0200
commiteb1b7d7d9149114eb6b4287b7cb40c49dccfb26e (patch)
tree12f797651abeda9512d56d8922199ae9edb2a293 /pipe/pipe_test.go
parent98844247a424558939228b82e9b5f28d723c4fe0 (diff)
downloadporg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.tar.gz
porg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.tar.bz2
porg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.zip
feat: Add storage interfaceHEADmaster
With this is easier to interact with storage layers.
Diffstat (limited to 'pipe/pipe_test.go')
-rw-r--r--pipe/pipe_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/pipe/pipe_test.go b/pipe/pipe_test.go
index e71b05b..950d039 100644
--- a/pipe/pipe_test.go
+++ b/pipe/pipe_test.go
@@ -20,12 +20,12 @@ func createCountPipe() <-chan int {
return cout
}
-func multiply(in int) int {
- return in * Multiplier
+func multiply(in int) (int, error) {
+ return in * Multiplier, nil
}
-func devide(in int) int {
- return in / Multiplier
+func devide(in int) (int, error) {
+ return in / Multiplier, nil
}
func TestProc(t *testing.T) {
@@ -81,13 +81,14 @@ func createBuffers() []*buffer {
return buffers
}
-func multiplyBuffer(in *buffer) *buffer {
+func multiplyBuffer(in *buffer) (*buffer, error) {
in.value = in.value * Multiplier
- return in
+ return in, nil
}
-func devideBuffer(in *buffer) {
+func devideBuffer(in *buffer) error {
in.value = in.value / Multiplier
+ return nil
}
func TestTailProc(t *testing.T) {