Skip to content

Commit 564f30c

Browse files
Merge pull request #7 from fabiodcorreia/restructure-v1
Restructure v1
2 parents 6626061 + 6ff670c commit 564f30c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4083
-1309
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
language: [ 'go' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
3836
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3937

4038
steps:

Makefile

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#VERSION = $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || echo v0)
2-
VERSION = $(shell git describe --tags --match=v* 2> /dev/null || echo 0.1.0)
1+
VERSION = $(shell git describe --tags --match=v* 2> /dev/null || echo 0.0.0)
32

43
APPID = com.github.fabiodcorreia.catch-my-file
54
ICON = assets/icons/icon-512.png
@@ -15,13 +14,10 @@ review: format
1514
@misspell .
1615

1716
@echo "============= Ineffectual Assignments Check ============= "
18-
@ineffassign $(TARGET)
19-
20-
@echo "============= Cyclomatic Complexity Check ============= "
21-
@gocyclo -total -over 5 -avg $(TARGET)
17+
@ineffassign ./...
2218

2319
@echo "============= Duplication Check ============= "
24-
@dupl -t 15 $(TARGET)
20+
find ./pkg -not -name '*_test.go' -name '*.go' | dupl -t 30 -files
2521

2622
@echo "============= Repeated Strings Check ============= "
2723
@goconst $(TARGET)
@@ -37,8 +33,26 @@ review: format
3733

3834
@echo "============= Shadow Variables Check ============= "
3935
@shadow -strict ./...
36+
37+
@echo "============= Cyclomatic Complexity Check ============= "
38+
@gocyclo -total -ignore "_test" -over 8 -avg $(TARGET)
4039

41-
pre-build: review
40+
test:
41+
@go test -cover ./pkg/...
42+
43+
cover:
44+
@go test -coverprofile=coverage.out ./pkg/...
45+
@go tool cover -func=coverage.out
46+
47+
cover-html:
48+
@go test -coverprofile=coverage.out ./pkg/...
49+
@go tool cover -html=coverage.out
50+
51+
52+
bench:
53+
go test -benchtime=1s -count=5 -benchmem -bench . ./pkg/...
54+
55+
pre-build: review test
4256
go mod tidy
4357

4458
build: pre-build
@@ -51,7 +65,9 @@ linux: pre-build
5165
fyne-cross linux -arch amd64,arm64 -app-id $(APPID) -icon $(ICON) -app-version $(VERSION) -output $(NAME)
5266

5367
windows: pre-build
54-
fyne-cross windows -arch amd64 -app-id $(APPID) -icon $(ICON) -app-version $(VERSION) -output $(NAME)
68+
fyne-cross windows -arch amd64 -app-id $(APPID) -icon $(ICON) -app-version $(VERSION) -output "$(NAME).exe"
69+
70+
build-all: pre-build darwin linux windows
5571

5672
bundle-linux: linux
5773
mv fyne-cross/dist/linux-amd64/$(NAME).tar.gz dist/$(NAME)-$(VERSION)-linux-amd64.tar.gz

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Catch My File
44

5-
Catch My File lets you easily send and receive files between the peers on the local network.
5+
Catch My File lets you easily send and receive files between peers on the local network.
66

77
## Why?
88

@@ -18,27 +18,27 @@ I wanted a tool that allows to:
1818
- Discover other peers on the local network without any configuration
1919
- Send specific files to specific peers
2020
- Accept or reject files sent by other peers
21+
- Follow the transfer progress
2122
- Checksum (SHA256) verification of the file when transfer is completed
22-
- Log display for relevant messages
2323

2424
## Installation
2525

2626
- Download the required package from the releases page
2727
- Extract the package and run the application
2828
- MacOS
29-
- Copy the application to the applications folder
29+
- Copy the application to the applications folder or just run it directly
3030
- On the frist run need to allow the app to run and make network connections
3131
- Linux
3232
- Run the command `sudo make install` to install the application
3333
- Run the command `sudo make uninstall` to remove the application
3434
- Windows
35-
- *TODO*
35+
- Just run the executable
3636

3737
## Usage
3838

3939
### Peers Panel
4040

41-
This panel will show all the other peers using the application on the local network. Pressing **Send File** we can select a file from the filesystem and send it to that peer.
41+
This panel will show all the other peers using the application on the local network. Pressing send button we can select a file from the filesystem and send it to that peer.
4242

4343
![peers-view](assets/screenshots/peers-view.png)
4444

@@ -49,21 +49,11 @@ After the file is selected a checksum(SHA256) is generated and a file transfer r
4949
![prepar-for-sending](assets/screenshots/prepar-for-sending.png)
5050

5151

52-
### Sending Panel
52+
### Transfers Panel
5353

54-
After the request is send a record is added to the Sending tab where we can follow the progress.
54+
After the request is send a record is added to the Transfers tab where the sender can follow the progress.
5555

56-
![sender-view](assets/screenshots/sender-view.png)
57-
58-
### Receiver
59-
60-
When a peer receives a request to accept a file, a modal is shown showing that information.
61-
62-
![transfer-request-received](assets/screenshots/transfer-request-received.png)
63-
64-
### Receiving Panel
65-
66-
After a request is received we can **Accept** or **Reject** it, if rejected nothing will be transferred.
56+
At the same time on the receiver side a similar record is added with the options to **Accept** or **Reject** the transfer, if rejected nothing will be transferred.
6757

6858
![receiver-view](assets/screenshots/receiver-view.png)
6959

@@ -75,6 +65,14 @@ The sender can also see the progress.
7565

7666
![sending](assets/screenshots/sending.png)
7767

68+
Once the transfer is completed on the sender side, the receiver will start the verification to insure the file integrity.
69+
70+
![verifying](assets/screenshots/verifying.png)
71+
72+
When the verification is completed with success the transfer will be completed.
73+
74+
![completed](assets/screenshots/completed.png)
75+
7876

7977
## Built With
8078
- [Go](https://go.dev/)

assets/screenshots/completed.png

27.9 KB
Loading

assets/screenshots/peers-view.png

2.03 KB
Loading
-4.88 KB
Loading

assets/screenshots/receiver-view.png

-4.51 KB
Loading

assets/screenshots/receiving.png

-5.52 KB
Loading

assets/screenshots/sender-view.png

-32.6 KB
Binary file not shown.

assets/screenshots/sending.png

-882 Bytes
Loading
-41.7 KB
Binary file not shown.

assets/screenshots/verifying.png

26.4 KB
Loading

cmd/frontend/frontend.go

Lines changed: 0 additions & 89 deletions
This file was deleted.

cmd/frontend/logs.go

Lines changed: 0 additions & 50 deletions
This file was deleted.

cmd/frontend/peers.go

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)