Skip to content

Commit

Permalink
Change go version to 1.20
Browse files Browse the repository at this point in the history
Change update time to uint32 size
  • Loading branch information
leech001 committed Apr 2, 2023
1 parent 53be419 commit 994cdf8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.19
go-version: ^1.20

- name: Build amd64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o monitor-amd64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-amd64

- name: Build arm
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o monitor-arm
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-arm

- name: Build arm64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o monitor-arm64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-arm64

- name: Build release
uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:latest AS builder
WORKDIR /build
COPY app .
RUN go get main
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o monitor
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor


FROM alpine:latest
Expand Down
2 changes: 1 addition & 1 deletion app/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module main

go 1.19
go 1.20

require (
github.com/Ullaakut/nmap/v2 v2.2.2
Expand Down
2 changes: 1 addition & 1 deletion app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

type Config struct {
App struct {
Update uint16
Update uint32
}
Telegram struct {
Token string
Expand Down
2 changes: 1 addition & 1 deletion app/nmapScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// Scanning hosts for open ports
func nmapScan(update uint16, bot *tgbotapi.BotAPI, group int64, hosts struct {
func nmapScan(update uint32, bot *tgbotapi.BotAPI, group int64, hosts struct {
Host string
Ports []string
Exclusion struct {
Expand Down

0 comments on commit 994cdf8

Please sign in to comment.