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

fix for go 1.19 #1477

Merged
merged 2 commits into from
Feb 8, 2023
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
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ require (
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mmcloughlin/avo v0.0.0-20200523190732-4439b6b2c061 // indirect
github.com/pkg/profile v1.5.0
github.com/shirou/gopsutil/v3 v3.21.4
github.com/sirupsen/logrus v1.8.1
github.com/skycoin/skycoin v0.27.1
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug=
github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
10 changes: 6 additions & 4 deletions pkg/visor/etc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package visor

import (
"fmt"
"net/http"
_ "net/http/pprof" // nolint:gosec // https://golang.org/doc/diagnostics.html#profiling
"os"
"time"

"github.com/pkg/profile"
"github.com/spf13/cobra"

"github.com/skycoin/skywire-utilities/pkg/buildinfo"
"github.com/skycoin/skywire-utilities/pkg/logging"
)

/*
// "net/http"
// "time"
// _ "net/http/pprof" // nolint:gosec // https://golang.org/doc/diagnostics.html#profiling
//"github.com/pkg/profile" NOT WORKING WITH GO 1.19
func initPProf(log *logging.MasterLogger, profMode string, profAddr string) (stop func()) {
var optFunc func(*profile.Profile)

Expand Down Expand Up @@ -55,6 +56,7 @@ func initPProf(log *logging.MasterLogger, profMode string, profAddr string) (sto
}
return stop
}
*/

func logBuildInfo(mLog *logging.MasterLogger) {
log := mLog.PackageLogger("buildinfo")
Expand Down
5 changes: 3 additions & 2 deletions pkg/visor/visor.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ func run(conf *visorconfig.V1) error {
store, hook := logstore.MakeStore(runtimeLogMaxEntries)
mLog.AddHook(hook)

stopPProf := initPProf(mLog, pprofMode, pprofAddr)
defer stopPProf()
//commented out pending fixes for go 1.19
//stopPProf := initPProf(mLog, pprofMode, pprofAddr)
//defer stopPProf()

if conf == nil {
conf = initConfig()
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/godbus/dbus/v5/conn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions vendor/github.com/pkg/profile/.travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/pkg/profile/AUTHORS

This file was deleted.

24 changes: 0 additions & 24 deletions vendor/github.com/pkg/profile/LICENSE

This file was deleted.

57 changes: 0 additions & 57 deletions vendor/github.com/pkg/profile/README.md

This file was deleted.

Loading