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

Reduce complexity when parsing content #14

Closed
ccoVeille opened this issue Jun 23, 2024 · 4 comments · Fixed by #16
Closed

Reduce complexity when parsing content #14

ccoVeille opened this issue Jun 23, 2024 · 4 comments · Fixed by #16
Labels
good first issue Good for newcomers refactoring Issues or PRs to improving code structure, without changing its external behavior

Comments

@ccoVeille
Copy link
Contributor

The complexity of the code was increased with #13 by the multiple branching if

The parsing of the content could be moved out the main with something like this

contentStr, err := parseContent(flag)
if err != nil {
fmt.Println
os.Exitt(1)
}

// …

func parseContent(flag) string, error {
   if directText != {
      return *directText
   }

   // …
}

Originally posted by @ccoVeille in #13 (comment)

@supitsdu supitsdu added good first issue Good for newcomers refactoring Issues or PRs to improving code structure, without changing its external behavior labels Jun 23, 2024
@karimalzalek
Copy link
Contributor

karimalzalek commented Jun 24, 2024

@supitsdu hello there, working on my first issue. I've forked the repo and will give this a try.

@karimalzalek
Copy link
Contributor

I have forked the code, made the changes and create a PR, let me know what you think of the changes.

Thanks.

@ccoVeille
Copy link
Contributor Author

I would like you to reopen the issue, because my code reviews was missed (by my fault)

Please have a look here
#15 (comment)

@supitsdu supitsdu reopened this Jun 24, 2024
@supitsdu supitsdu added the in-progress Issues or PRs currently being worked on. label Jun 24, 2024
@ccoVeille
Copy link
Contributor Author

Thanks

@supitsdu supitsdu removed the in-progress Issues or PRs currently being worked on. label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring Issues or PRs to improving code structure, without changing its external behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants