mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-27 15:30:23 +00:00
cleanup: move execCommandErr to volumemounter
Moved execCommandErr to the volumemounter.go which is the only caller of this function and moving the execCommandErr helps in reducing the util file. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
31696a6ce0
commit
da70ed50dc
@ -20,7 +20,6 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
@ -29,12 +28,6 @@ import (
|
||||
|
||||
type volumeID string
|
||||
|
||||
func execCommandErr(ctx context.Context, program string, args ...string) error {
|
||||
_, _, err := util.ExecCommand(ctx, program, args...)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func parseTime(ctx context.Context, createTime time.Time) (*timestamp.Timestamp, error) {
|
||||
tm, err := ptypes.TimestampProto(createTime)
|
||||
if err != nil {
|
||||
|
@ -66,6 +66,12 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func execCommandErr(ctx context.Context, program string, args ...string) error {
|
||||
_, _, err := util.ExecCommand(ctx, program, args...)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// Load available ceph mounters installed on system into availableMounters
|
||||
// Called from driver.go's Run().
|
||||
func loadAvailableMounters(conf *util.Config) error {
|
||||
|
Loading…
Reference in New Issue
Block a user