-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/financial data #3
base: main
Are you sure you want to change the base?
Feature/financial data #3
Conversation
main.go
Outdated
@@ -17,3 +32,39 @@ func main() { | |||
r.POST("/commands", views.NewQuoteHandler(slackClient, signingSecret).QuoteServe) | |||
r.Run() | |||
} | |||
|
|||
func ParseFinancialTable(url string) []Table { |
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.
This should go to seperate package?
main.go
Outdated
func main() { | ||
tables := ParseFinancialTable("https://finanse.hs-silesia.pl") |
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.
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 { |
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.
This function has a misleading name. It says StringToFloat, while the first argument is goquery.Selection pointer.
main.go
Outdated
for i:=0; i<len(all_tables); i++ { | ||
fmt.Println(all_tables[i].caption) | ||
} |
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.
Given that this is slice, wouldn't that be better?
for i:=0; i<len(all_tables); i++ { | |
fmt.Println(all_tables[i].caption) | |
} | |
for idx, table := range all_tables { | |
fmt.Println(table.caption) | |
} |
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.
Remove binary from this PR.
@@ -1,2 +0,0 @@ | |||
SLACK_AUTH_TOKEN= | |||
SLACK_SIGNING_SECRET= |
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.
Why deleting this? Those are so people can do initial configuration easily by just copying it to .env file and sourcing it.
No description provided.