Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workshop #3

Merged
merged 3 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/template-design
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ The name of the function is CmpThenAdd. The function will compare the value of t

If the value of the first parameter is greater than the value of the second parameter, the function will return the value of the first parameter.
If the value of the second parameter are greater than the value of the first parameter, the function will return the value of the second parameter.
Otherwise, the function will return the value of the first parameter plus the second parameter.
Otherwise, the function will return the value of the first parameter plus the second parameter.

JasonWu0506 marked this conversation as resolved.
Show resolved Hide resolved



3 changes: 3 additions & 0 deletions pkg/tempalte_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ func TestAdd(t *testing.T) {

// miss covering other conditions
}
func TestComp(t *testing.T) {
t.Errorf("expect %v, but got %v", 2, v)
}
3 changes: 3 additions & 0 deletions pkg/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ func CmpThenAdd(p1 int, p2 int) int {
return p1 + p2
}
}

func main() {
}