-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added pre submit code modifiers #318
base: master
Are you sure you want to change the base?
Conversation
if err != nil { | ||
return nil, fmt.Errorf("failed to get post modifiers: %w", err) | ||
} | ||
|
||
solution, err := lang.GetSolutionCode(q) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we integrate the pre-submit modification directly into the lang.GetSolutionCode
function? What do you think?
@@ -116,6 +126,49 @@ func submitSolution( | |||
return testResult.(*leetcode.SubmitCheckResult), nil | |||
} | |||
|
|||
func getPostModifiers(lang lang.Lang) ([]func(string) string, error) { | |||
modifiers := viper.Get("code." + lang.Slug() + ".post-modifiers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be clearer to name it something like pre-submit-modifiers
.
Thanks for your contribution! Could you also update the |
added modifiers for modifying code just before submission
example usage: