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

DEMO: throwaway PR for AI code-review skill testing #82

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

Open
naveen-kurra wants to merge 1 commit into initializ:main
base: main
Choose a base branch
Loading
from naveen-kurra:demo-ai-review-target
Open
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
38 changes: 38 additions & 0 deletions demo_review_target.go
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package demo

import (
"errors"
"strings"
)

func DoSomething(input string) (string, error) {
if input == "" {
return "", errors.New("empty")
}
result := input + "!"
return result, nil
}

func helper(x int) int {
if x < 0 {
x = 0
}
return x * 2
}

@naveen-kurra naveen-kurra May 27, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual URL host parsing is incorrect for several valid URL forms


func ParseHost(rawURL string) string {
idx := strings.Index(rawURL, "://")
if idx == -1 {
return rawURL
}
rest := rawURL[idx+3:]
slash := strings.Index(rest, "/")
if slash == -1 {
return rest
}
return rest[:slash]
}

@naveen-kurra naveen-kurra May 27, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Division by zero can panic at runtime

func DivideUnsafe(a, b int) int {
return a / b
}
Loading

AltStyle によって変換されたページ (->オリジナル) /