Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11f7f53

Browse files
committed
Add the hello example
1 parent957b8d9 commit11f7f53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎main/main.go‎renamed to ‎example/hello_test.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
packagemain
1+
packageexample
22

33
import (
44
"context"
55
"fmt"
6+
"testing"
67

78
"github.com/no-src/workchain"
89
)
910

10-
funcmain() {
11+
funcTestHello(t*testing.T) {
1112
helloWork:=workchain.NewWork(hello)
1213
worldWork:=workchain.NewWork(world)
13-
mainWork:=workchain.WorkChain(helloWork,worldWork)
1414
ctx:=context.WithValue(context.Background(),"title","workchain")
15-
mainWork.Do(ctx)
15+
workchain.WorkChain(helloWork,worldWork).Do(ctx)
1616
}
1717

1818
funchello(ctx context.Context)error {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp