Skip to content

Commit

Permalink
feat(mod): update Go version
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih committed Jul 25, 2023
1 parent 8756018 commit 584c226
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 33 deletions.
1 change: 1 addition & 0 deletions app/backing_disable.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !qcow
// +build !qcow

/*
Expand Down
2 changes: 1 addition & 1 deletion controller/rest/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/rancher/go-rancher/api"
)

//ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
// ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
func (s *Server) ListJournal(rw http.ResponseWriter, req *http.Request) error {
var input JournalInput
apiContext := api.GetApiContext(req)
Expand Down
1 change: 1 addition & 0 deletions error-inject/default.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

/*
Expand Down
1 change: 1 addition & 0 deletions error-inject/inject.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build debug
// +build debug

/*
Expand Down
2 changes: 1 addition & 1 deletion frontend/gotgt/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (t *goTgt) Stats() types.Stats {
return (types.Stats)(t.targetDriver.Stats())
}

// Resize is called to resize the volume
// Resize is called to resize the volume
func (t *goTgt) Resize(size uint64) error {
if !t.isUp {
return fmt.Errorf("Volume is not up")
Expand Down
45 changes: 32 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,40 +1,59 @@
module github.com/openebs/jiva

go 1.13
go 1.19

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/containerd/containerd v1.3.4 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible
github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.4.0
github.com/frostschutz/go-fibmap v0.0.0-20160825162329-b32c231bfe6a
github.com/google/uuid v1.2.0
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.4
github.com/gorilla/websocket v1.4.1 // indirect
github.com/gostor/gotgt v0.2.1-0.20210817044456-e5d5366e2b59
github.com/kubernetes-csi/csi-lib-iscsi v0.0.0-20200118015005-959f12c91ca8
github.com/morikuni/aec v1.0.0 // indirect
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/openebs/sparse-tools v1.1.0
github.com/prometheus/client_golang v1.5.1
github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.7.0
github.com/urfave/cli v1.22.3
go.uber.org/zap v1.14.1
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
)

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/containerd/containerd v1.3.4 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/protobuf v1.3.3 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/websocket v1.4.1 // indirect
github.com/kr/text v0.1.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.9.1 // indirect
github.com/prometheus/procfs v0.0.8 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
google.golang.org/grpc v1.29.1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gotest.tools v2.2.0+incompatible // indirect
)
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU=
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
Expand All @@ -28,7 +26,6 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
Expand Down Expand Up @@ -145,7 +142,6 @@ github.com/rancher/go-fibmap v0.0.0-20160418233256-5fc9f8c1ed47/go.mod h1:aLaSmp
github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c h1:qOpIX3tKM+qjUXCiy52DOXm0EmeA6/SJeApK2tyKbVE=
github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c/go.mod h1:7oQvGNiJsGvrUgB+7AH8bmdzuR0uhULfwKb43Ht0hUk=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down Expand Up @@ -235,7 +231,6 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down
2 changes: 1 addition & 1 deletion replica/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func drainHoleCreatorChan() {
}
}

//CreateHoles removes the offsets from corresponding sparse files
// CreateHoles removes the offsets from corresponding sparse files
func CreateHoles() {
var (
fd uintptr
Expand Down
4 changes: 2 additions & 2 deletions replica/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ func (r *Replica) DisplayChain() ([]string, error) {
return result, nil
}

//Chain returns the disk chain starting with Head(index=0),
//till the base snapshot
// Chain returns the disk chain starting with Head(index=0),
// till the base snapshot
func (r *Replica) Chain() ([]string, error) {
r.RLock()
defer r.RUnlock()
Expand Down
20 changes: 10 additions & 10 deletions rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func SetRPCTimeout() {
}
}

//SampleOp operation
// SampleOp operation
type SampleOp int

const (
Expand All @@ -75,7 +75,7 @@ const (
OpUnmap
)

//Client replica client
// Client replica client
type Client struct {
end chan struct{}
requests chan *Message
Expand All @@ -89,7 +89,7 @@ type Client struct {
err error
}

//NewClient replica client
// NewClient replica client
func NewClient(conn net.Conn, closeChan chan struct{}) *Client {
c := &Client{
wire: NewWire(conn),
Expand All @@ -107,12 +107,12 @@ func NewClient(conn net.Conn, closeChan chan struct{}) *Client {
return c
}

//TargetID operation target ID
// TargetID operation target ID
func (c *Client) TargetID() string {
return c.peerAddr
}

//WriteAt replica client
// WriteAt replica client
func (c *Client) WriteAt(buf []byte, offset int64) (int, error) {
return c.operation(TypeWrite, buf, offset, int64(len(buf)))
}
Expand All @@ -124,19 +124,19 @@ func (c *Client) Update() (int, error) {
}
*/

//SetError replica client transport error
// SetError replica client transport error
func (c *Client) SetError(err error) {
c.responses <- &Message{
transportErr: err,
}
}

//ReadAt replica client
// ReadAt replica client
func (c *Client) ReadAt(buf []byte, offset int64) (int, error) {
return c.operation(TypeRead, buf, offset, int64(len(buf)))
}

//Sync replica client
// Sync replica client
func (c *Client) Sync() (int, error) {
_, err := c.operation(TypeSync, nil, 0, 0)
if err != nil {
Expand All @@ -153,7 +153,7 @@ func (c *Client) Unmap(offset int64, length int64) (int, error) {
return 0, err
}

//Ping replica client
// Ping replica client
func (c *Client) Ping() error {
_, err := c.operation(TypePing, nil, 0, 0)
return err
Expand Down Expand Up @@ -244,7 +244,7 @@ func (c *Client) operation(op uint32, buf []byte, offset int64, length int64) (i
}
}

//Close replica client
// Close replica client
func (c *Client) Close() error {
if err := c.wire.CloseRead(); err != nil {
return err
Expand Down

0 comments on commit 584c226

Please sign in to comment.