cleanup: address godot warnings

Top level comments should end in a period

Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug
2020-07-19 17:51:03 +05:30
committed by mergify[bot]
parent cb7ab307dd
commit 7f94a57908
48 changed files with 233 additions and 233 deletions

View File

@ -44,7 +44,7 @@ const (
Trace
)
// RoundOffVolSize rounds up given quantity upto chunks of MiB/GiB
// RoundOffVolSize rounds up given quantity upto chunks of MiB/GiB.
func RoundOffVolSize(size int64) int64 {
size = RoundOffBytes(size)
// convert size back to MiB for rbd CLI
@ -53,7 +53,7 @@ func RoundOffVolSize(size int64) int64 {
// RoundOffBytes converts roundoff the size
// 1.1Mib will be round off to 2Mib same for GiB
// size less than 1MiB will be round off to 1MiB
// size less than 1MiB will be round off to 1MiB.
func RoundOffBytes(bytes int64) int64 {
var num int64
floatBytes := float64(bytes)
@ -68,7 +68,7 @@ func RoundOffBytes(bytes int64) int64 {
return num
}
// variables which will be set during the build time
// variables which will be set during the build time.
var (
// GitCommit tell the latest git commit image is built from
GitCommit string
@ -76,7 +76,7 @@ var (
DriverVersion string
)
// Config holds the parameters list which can be configured
// Config holds the parameters list which can be configured.
type Config struct {
Vtype string // driver type [rbd|cephfs|liveness]
Endpoint string // CSI endpoint
@ -119,7 +119,7 @@ type Config struct {
MaxSnapshotsOnImage uint
}
// ValidateDriverName validates the driver name
// ValidateDriverName validates the driver name.
func ValidateDriverName(driverName string) error {
if driverName == "" {
return errors.New("driver name is empty")
@ -150,7 +150,7 @@ func GetKernelVersion() (string, error) {
return strings.TrimRight(string(utsname.Release[:]), "\x00"), nil
}
// KernelVersion holds kernel related informations
// KernelVersion holds kernel related informations.
type KernelVersion struct {
Version int
PatchLevel int
@ -235,7 +235,7 @@ func CheckKernelSupport(release string, supportedVersions []KernelVersion) bool
}
// GenerateVolID generates a volume ID based on passed in parameters and version, to be returned
// to the CO system
// to the CO system.
func GenerateVolID(ctx context.Context, monitors string, cr *Credentials, locationID int64, pool, clusterID, objUUID string, volIDVersion uint16) (string, error) {
var err error
@ -259,12 +259,12 @@ func GenerateVolID(ctx context.Context, monitors string, cr *Credentials, locati
return volID, err
}
// CreateMountPoint creates the directory with given path
// CreateMountPoint creates the directory with given path.
func CreateMountPoint(mountPath string) error {
return os.MkdirAll(mountPath, 0750)
}
// checkDirExists checks directory exists or not
// checkDirExists checks directory exists or not.
func checkDirExists(p string) bool {
if _, err := os.Stat(p); os.IsNotExist(err) {
return false
@ -272,7 +272,7 @@ func checkDirExists(p string) bool {
return true
}
// IsMountPoint checks if the given path is mountpoint or not
// IsMountPoint checks if the given path is mountpoint or not.
func IsMountPoint(p string) (bool, error) {
dummyMount := mount.New("")
notMnt, err := dummyMount.IsLikelyNotMountPoint(p)
@ -283,7 +283,7 @@ func IsMountPoint(p string) (bool, error) {
return !notMnt, nil
}
// Mount mounts the source to target path
// Mount mounts the source to target path.
func Mount(source, target, fstype string, options []string) error {
dummyMount := mount.New("")
return dummyMount.Mount(source, target, fstype, options)
@ -321,7 +321,7 @@ func contains(s []string, key string) bool {
return false
}
// DefaultLog helps in logging with klog.level 1
// DefaultLog helps in logging with klog.level 1.
func DefaultLog(message string, args ...interface{}) {
logMessage := fmt.Sprintf(message, args...)
// If logging is disabled, don't evaluate the arguments
@ -330,7 +330,7 @@ func DefaultLog(message string, args ...interface{}) {
}
}
// UsefulLog helps in logging with klog.level 2
// UsefulLog helps in logging with klog.level 2.
func UsefulLog(ctx context.Context, message string, args ...interface{}) {
logMessage := fmt.Sprintf(Log(ctx, message), args...)
// If logging is disabled, don't evaluate the arguments
@ -339,7 +339,7 @@ func UsefulLog(ctx context.Context, message string, args ...interface{}) {
}
}
// ExtendedLogMsg helps in logging a message with klog.level 3
// ExtendedLogMsg helps in logging a message with klog.level 3.
func ExtendedLogMsg(message string, args ...interface{}) {
logMessage := fmt.Sprintf(message, args...)
// If logging is disabled, don't evaluate the arguments
@ -348,7 +348,7 @@ func ExtendedLogMsg(message string, args ...interface{}) {
}
}
// ExtendedLog helps in logging with klog.level 3
// ExtendedLog helps in logging with klog.level 3.
func ExtendedLog(ctx context.Context, message string, args ...interface{}) {
logMessage := fmt.Sprintf(Log(ctx, message), args...)
// If logging is disabled, don't evaluate the arguments
@ -357,7 +357,7 @@ func ExtendedLog(ctx context.Context, message string, args ...interface{}) {
}
}
// DebugLogMsg helps in logging a message with klog.level 4
// DebugLogMsg helps in logging a message with klog.level 4.
func DebugLogMsg(message string, args ...interface{}) {
logMessage := fmt.Sprintf(message, args...)
// If logging is disabled, don't evaluate the arguments
@ -366,7 +366,7 @@ func DebugLogMsg(message string, args ...interface{}) {
}
}
// DebugLog helps in logging with klog.level 4
// DebugLog helps in logging with klog.level 4.
func DebugLog(ctx context.Context, message string, args ...interface{}) {
logMessage := fmt.Sprintf(Log(ctx, message), args...)
// If logging is disabled, don't evaluate the arguments
@ -375,7 +375,7 @@ func DebugLog(ctx context.Context, message string, args ...interface{}) {
}
}
// TraceLogMsg helps in logging a message with klog.level 5
// TraceLogMsg helps in logging a message with klog.level 5.
func TraceLogMsg(message string, args ...interface{}) {
logMessage := fmt.Sprintf(message, args...)
// If logging is disabled, don't evaluate the arguments
@ -384,7 +384,7 @@ func TraceLogMsg(message string, args ...interface{}) {
}
}
// TraceLog helps in logging with klog.level 5
// TraceLog helps in logging with klog.level 5.
func TraceLog(ctx context.Context, message string, args ...interface{}) {
logMessage := fmt.Sprintf(Log(ctx, message), args...)
// If logging is disabled, don't evaluate the arguments