Open
Conversation
galuszkak
requested changes
Apr 30, 2022
main.go
Outdated
| r.Run() | ||
| } | ||
|
|
||
| func ParseFinancialTable(url string) []Table { |
Member
There was a problem hiding this comment.
This should go to seperate package?
main.go
Outdated
| } | ||
|
|
||
| func main() { | ||
| tables := ParseFinancialTable("https://finanse.hs-silesia.pl") |
Member
There was a problem hiding this comment.
Shouldn't this be as a separate endpoint? why this is inside main function?
main.go
Outdated
| return all_tables | ||
| } | ||
|
|
||
| func StringToFloat(s *goquery.Selection) float64 { |
Member
There was a problem hiding this comment.
This function has a misleading name. It says StringToFloat, while the first argument is goquery.Selection pointer.
main.go
Outdated
Comment on lines
54
to
56
| for i:=0; i<len(all_tables); i++ { | ||
| fmt.Println(all_tables[i].caption) | ||
| } |
Member
There was a problem hiding this comment.
Given that this is slice, wouldn't that be better?
Suggested change
| for i:=0; i<len(all_tables); i++ { | |
| fmt.Println(all_tables[i].caption) | |
| } | |
| for idx, table := range all_tables { | |
| fmt.Println(table.caption) | |
| } |
galuszkak
requested changes
May 1, 2022
Member
galuszkak
left a comment
There was a problem hiding this comment.
Remove binary from this PR.
| @@ -1,2 +0,0 @@ | |||
| SLACK_AUTH_TOKEN= | |||
| SLACK_SIGNING_SECRET= No newline at end of file | |||
Member
There was a problem hiding this comment.
Why deleting this? Those are so people can do initial configuration easily by just copying it to .env file and sourcing it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.