-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from kevincobain2000/develop
100x performance improvement. Python -> Go
- Loading branch information
Showing
69 changed files
with
866 additions
and
5,206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
on: | ||
pull_request: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- '**' | ||
|
||
name: "Cover It Up v2" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
jobs: | ||
coveritup: | ||
strategy: | ||
matrix: | ||
go-version: [latest] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: kevincobain2000/action-gobrew@v2 | ||
with: | ||
version: ${{ matrix.go-version }} | ||
|
||
|
||
- name: Install Tools | ||
run: | | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
go install github.com/axw/gocov/gocov@latest | ||
go install github.com/AlekSi/gocov-xml@latest | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh | ||
- name: Go Mod Tidy | ||
run: go mod tidy | ||
- name: Go Build | ||
uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
type: go-build-time | ||
command: go build main.go | ||
record: runtime | ||
|
||
- name: Test | ||
uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
type: go-test-runtime | ||
command: go test -race -v ./... -count=1 -coverprofile=coverage.out | ||
record: runtime | ||
metric: sec | ||
|
||
- name: Coverage | ||
run: gocov convert coverage.out | gocov-xml > coverage.xml | ||
- name: Coverage Cover Totalizer | ||
uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
type: coverage | ||
command: ./cover-totalizer coverage.xml | ||
|
||
- name: Go Binary Size | ||
uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
type: go-binary-size | ||
command: du -sk main | awk '{print $1}' | ||
|
||
- name: Number of dependencies | ||
uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
type: go-mod-dependencies | ||
command: go list -m all|wc -l|awk '{$1=$1};1' | ||
|
||
- uses: kevincobain2000/action-coveritup@v2 | ||
with: | ||
pr_comment: true |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: kevincobain2000/action-gobrew@v2 | ||
with: | ||
version: 'mod' | ||
- name: Setup Node.js ${{ matrix.node-versions }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
- name: Build Dist for Embed | ||
working-directory: ui | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --skip-validate | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
linters: | ||
# Disable all linters. | ||
# Default: false | ||
disable-all: true | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- bodyclose | ||
- staticcheck | ||
- bodyclose | ||
- dupl | ||
- errorlint | ||
- exportloopref | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- goprintffuncname | ||
- gosec | ||
- prealloc | ||
- revive | ||
- predeclared | ||
- stylecheck | ||
- whitespace |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- | ||
main: main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
# - windows | ||
- freebsd | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- arm | ||
ignore: | ||
- goos: windows | ||
goarch: arm64 | ||
- goos: freebsd | ||
goarch: arm64 | ||
- goos: windows | ||
goarch: arm | ||
- goos: freebsd | ||
goarch: arm | ||
- goos: darwin | ||
goarch: arm | ||
archives: | ||
- | ||
format: binary | ||
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^bin' |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Email Extractor | ||
|
||
**With God speed - Extract email addresses from entire website, by crawling URLS.** | ||
|
||
**Just 10KB** Binary size | ||
|
||
Web email extractor by url crawl using command line interface. A free utility to extract email address by crawling a given url upto a given depth or number of urls to crawl provided by the user. Email addresses can be extracted from any url. Emails Extractor can be used to extract emails from a given url. | ||
|
||
First it extracts all the number of urls provided by the user and then extracts emails using simple Python libraries. This simple application allows to crawl through a website with a max depth of crawling 5000 urls and extracts email addresses and saves to a file. | ||
|
||
# C.I | ||
|
||
![go-build-time](https://coveritup.app/badge?org=kevincobain2000&repo=email_extractor&type=go-build-time&branch=master) | ||
![go-test-runtime](https://coveritup.app/badge?org=kevincobain2000&repo=email_extractor&type=go-test-runtime&branch=master) | ||
![coverage](https://coveritup.app/badge?org=kevincobain2000&repo=email_extractor&type=coverage&branch=master) | ||
![go-binary-size](https://coveritup.app/badge?org=kevincobain2000&repo=email_extractor&type=go-binary-size&branch=master) | ||
![go-mod-dependencies](https://coveritup.app/badge?org=kevincobain2000&repo=email_extractor&type=go-mod-dependencies&branch=master) | ||
|
||
![go-build-time](https://coveritup.app/chart?org=kevincobain2000&repo=email_extractor&type=go-build-time&output=svg&width=160&height=160&branch=master) | ||
![go-test-runtime](https://coveritup.app/chart?org=kevincobain2000&repo=email_extractor&type=go-test-runtime&output=svg&width=160&height=160&branch=master) | ||
![coverage](https://coveritup.app/chart?org=kevincobain2000&repo=email_extractor&type=coverage&output=svg&width=160&height=160&branch=master) | ||
![go-binary-size](https://coveritup.app/chart?org=kevincobain2000&repo=email_extractor&type=go-binary-size&output=svg&width=160&height=160&branch=master) | ||
![go-mod-dependencies](https://coveritup.app/chart?org=kevincobain2000&repo=email_extractor&type=go-mod-dependencies&output=svg&width=160&height=160&branch=master) | ||
|
||
|
||
# Install | ||
|
||
```sh | ||
curl -sLk https://raw.githubusercontent.com/kevincobain2000/email_extractor/master/install.sh | sh | ||
``` | ||
|
||
|
||
# Usage | ||
|
||
``` | ||
./email_extractor --url= | ||
``` | ||
|
||
|
||
```sh | ||
-limit int | ||
limit of urls to crawl (default 20) | ||
-timeout int | ||
timeout in milliseconds (default 1000) | ||
-url string | ||
url to crawl | ||
``` | ||
|
||
# CHANGE LOG | ||
|
||
- v1 - Python implementation to extract email addresses by crawling URLS. Installation using pip. | ||
- v2 - 100x performance improvement by using goroutines |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.