Skip to content

Commit 7a413ad

Browse files
committed
fix:adjust code style
1 parent d197cbd commit 7a413ad

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

mysqlcluster/mysqlcluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func (c *MysqlCluster) EnsureVolumes() []corev1.Volume {
270270
},
271271
})
272272
}
273-
// add the ssl secret mounts
273+
// Add the ssl secret mounts.
274274
if len(c.Spec.TlsSecretName) != 0 {
275275
volumes = append(volumes, corev1.Volume{
276276
Name: utils.TlsVolumeName + "-sidecar",

sidecar/init.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ func runInitCommand(cfg *Config) error {
140140
if err = copyFile(path.Join(mysqlCMPath, "my.cnf"), path.Join(mysqlConfigPath, "my.cnf")); err != nil {
141141
return fmt.Errorf("failed to copy my.cnf: %s", err)
142142
}
143-
//ssl settins
143+
144+
// ssl settins
144145
if exists, _ := checkIfPathExists(utils.TlsMountPath); exists {
145-
buildSSLdata(uid, gid)
146+
buildSSLdata()
146147
}
147148
buildDefaultXenonMeta(uid, gid)
148149

@@ -317,7 +318,8 @@ func buildDefaultXenonMeta(uid, gid int) error {
317318
}
318319
return nil
319320
}
320-
func buildSSLdata(uid, gid int) error {
321+
322+
func buildSSLdata() error {
321323
// cp -rp /tmp/myssl/* /etc/mysql/ssl/
322324
//refer https://stackoverflow.com/questions/31467153/golang-failed-exec-command-that-works-in-terminal
323325
shellCmd := "cp /tmp/mysql-ssl/* " + utils.TlsMountPath

utils/constants.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ var (
4747
ClusterAdd: http.MethodPost,
4848
ClusterRemove: http.MethodPost,
4949
}
50-
//RunAsUser is the user id for mysql
51-
RunAsUser int64 = 1001
52-
//fsgroup is the group id for mysql
53-
FsGroup int64 = 1001
5450
)
5551

5652
const (

0 commit comments

Comments
 (0)