Skip to content
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

Remove hardcoded services #1872

Merged
merged 18 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.23.x
- uses: actions/checkout@v4
- name: Install Requirements
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
make dep
chmod +x ./ci_scripts/create-ip-aliases.sh
./ci_scripts/create-ip-aliases.sh
Expand All @@ -25,11 +25,11 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.23.x
- uses: actions/checkout@v4
- name: Install Requirements
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
make dep
chmod +x ./ci_scripts/create-ip-aliases.sh
./ci_scripts/create-ip-aliases.sh
Expand All @@ -44,12 +44,12 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.23.x
- uses: actions/checkout@v4
- name: Install Requirements
run: |
choco install make
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
make dep
- name: Testing
run: |
Expand Down
6 changes: 2 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true
Expand All @@ -66,8 +66,7 @@ linters-settings:
check-blank: true
govet:
# report about shadowed variables
check-shadowing: true

shadow: true
# Obtain type information from installed (to $GOPATH/pkg) package files:
# golangci-lint will execute `go install -i` and `go test -i` for analyzed packages
# before analyzing them.
Expand Down Expand Up @@ -160,7 +159,6 @@ linters:
- ineffassign
- typecheck
- gosec
- megacheck
- misspell
- nakedret
enable-all: false
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ install-static: ## Install `skywire-visor`, `skywire-cli`, `setup-node`

lint: ## Run linters. Use make install-linters first
golangci-lint --version
${OPTS} golangci-lint run -c .golangci.yml ./...
${OPTS} golangci-lint run -c .golangci.yml skywire.go #break down the linter run over smaller sections of the source code
${OPTS} golangci-lint run -c .golangci.yml ./cmd/...
${OPTS} golangci-lint run -c .golangci.yml ./pkg/...
${OPTS} golangci-lint run -c .golangci.yml ./...

lint-windows: ## Run linters. Use make install-linters-windows first
powershell 'golangci-lint --version'
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,3 +549,14 @@ yay --mflags " -p git.PKGBUILD " -S skywire
6. [ ̶I̶s̶s̶u̶e̶ ̶a̶ ̶p̶e̶r̶s̶o̶n̶a̶l̶ ̶G̶i̶t̶H̶u̶b̶ ̶a̶c̶c̶e̶s̶s̶ ̶t̶o̶k̶e̶n̶.̶](https://github.com/settings/tokens)
7. ̶R̶u̶n̶ ̶`̶G̶I̶T̶H̶U̶B̶_̶T̶O̶K̶E̶N̶=̶y̶o̶u̶r̶_̶t̶o̶k̶e̶n̶ ̶m̶a̶k̶e̶ ̶g̶i̶t̶h̶u̶b̶-̶r̶e̶l̶e̶a̶s̶e̶`̶
8. [Check the created GitHub release.](https://github.com/skycoin/skywire/releases/)


## Dependency Graph

made with [goda](https://github.com/loov/goda)

```
goda graph github.com/skycoin/skywire/... | dot -Tsvg -o docs/skywire-goda-graph.svg
```

![Dependency Graph](docs/skywire-goda-graph.svg "github.com/skycoin/skywire Dependency Graph")
8 changes: 5 additions & 3 deletions cmd/apps/skychat/commands/skychat.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var RootCmd = &cobra.Command{
DisableSuggestions: true,
DisableFlagsInUseLine: true,
Version: buildinfo.Version(),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {

appCl = app.NewClient(nil)
defer appCl.Close()
Expand Down Expand Up @@ -277,8 +277,10 @@ func sseHandler(w http.ResponseWriter, req *http.Request) {
if !ok {
return
}
_, _ = fmt.Fprintf(w, "data: %s\n\n", msg)
f.Flush()
_, err := fmt.Fprintf(w, "data: %s\n\n", msg)
if err == nil {
f.Flush()
}

case <-req.Context().Done():
fmt.Print("SSE connection were closed.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/skysocks-client/commands/skysocks-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var RootCmd = &cobra.Command{
DisableSuggestions: true,
DisableFlagsInUseLine: true,
Version: buildinfo.Version(),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
appCl := app.NewClient(nil)
defer appCl.Close()

Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/skysocks/commands/skysocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var RootCmd = &cobra.Command{
DisableSuggestions: true,
DisableFlagsInUseLine: true,
Version: buildinfo.Version(),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
appCl := app.NewClient(nil)
defer appCl.Close()

Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/vpn-client/commands/vpn-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var RootCmd = &cobra.Command{
DisableSuggestions: true,
DisableFlagsInUseLine: true,
Version: buildinfo.Version(),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {

var directIPsCh, nonDirectIPsCh = make(chan net.IP, 100), make(chan net.IP, 100)
defer close(directIPsCh)
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/vpn-server/commands/vpn-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var RootCmd = &cobra.Command{
DisableSuggestions: true,
DisableFlagsInUseLine: true,
Version: buildinfo.Version(),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
appCl := app.NewClient(nil)
defer appCl.Close()

Expand Down
97 changes: 0 additions & 97 deletions cmd/skywire-cli/commands/config/dmsghttp.go

This file was deleted.

Loading
Loading