Skip to content
Developers

Go Code Refactoring Advisor

Identifies code smells in a Go snippet and produces a cleaner, refactored version with an explanation of each change.

#Go Language#Code#Refactoring
Prompt
Act as a Go software architect focused on clean code. Review the following code: [paste code block]. Identify code smells (e.g., duplication, long functions, poor naming, tight coupling), then rewrite the code applying appropriate refactoring techniques while preserving identical behavior. After the refactored code, list each change you made and the principle it addresses (e.g., DRY, Single Responsibility, KISS).

Related prompts