-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
090c172
commit eceec4e
Showing
16 changed files
with
324 additions
and
96 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
package scraper | ||
|
||
// Configuration is an open structure that contains scraper configuration. | ||
// | ||
// Packages contain prefixes of packages for scraper to scrape. | ||
// Each object of package that does not match any of predefined | ||
// package prefixes is omitted and its internal structure is not scraped. | ||
// When no package prefix is provided, the scraper will stop | ||
// scraping given structure on a root level. | ||
type Configuration struct { | ||
packages []string | ||
Packages []string | ||
} | ||
|
||
// NewConfiguration instantiates Configuration with a set of package | ||
// prefixes provided with variadic argument. | ||
func NewConfiguration(packages ...string) Configuration { | ||
return Configuration{ | ||
packages: packages, | ||
Packages: packages, | ||
} | ||
} |
This file contains 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
Oops, something went wrong.