Skip to content

Feature/financial data#3

Open
Anakin100100 wants to merge 4 commits intohackerspace-silesia:mainfrom
Anakin100100:feature/financial_data
Open

Feature/financial data#3
Anakin100100 wants to merge 4 commits intohackerspace-silesia:mainfrom
Anakin100100:feature/financial_data

Conversation

@Anakin100100
Copy link

No description provided.

main.go Outdated
r.Run()
}

func ParseFinancialTable(url string) []Table {
Copy link
Member

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")
Copy link
Member

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 {
Copy link
Member

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
Comment on lines 54 to 56
for i:=0; i<len(all_tables); i++ {
fmt.Println(all_tables[i].caption)
}
Copy link
Member

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?

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)
}

Copy link
Member

@galuszkak galuszkak left a 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= No newline at end of file
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants