fix golint fail #415

This commit is contained in:
u5surf
2018-11-15 00:58:13 +09:00
parent f25351c36a
commit 27114701ba
19 changed files with 55 additions and 18 deletions
+2 -2
View File
@@ -849,8 +849,8 @@ func (c *Cluster) GetCurrentProcess() Process {
}
// GetStatus provides status of the cluster
func (c *Cluster) GetStatus() *ClusterStatus {
return &ClusterStatus{
func (c *Cluster) GetStatus() *Status {
return &Status{
Cluster: c.Spec.ClusterName,
Team: c.Spec.TeamID,
Status: c.Status,
+1 -5
View File
@@ -77,11 +77,7 @@ func (c *Cluster) deletePod(podName spec.NamespacedName) error {
return err
}
if err := c.waitForPodDeletion(ch); err != nil {
return err
}
return nil
return c.waitForPodDeletion(ch)
}
func (c *Cluster) unregisterPodSubscriber(podName spec.NamespacedName) {
+3 -2
View File
@@ -20,6 +20,7 @@ const (
Replica PostgresRole = "replica"
)
// PodEventType describe value of event type
type PodEventType string
// Possible values for the EventType
@@ -50,8 +51,8 @@ type WorkerStatus struct {
CurrentProcess Process
}
// ClusterStatus describes status of the cluster
type ClusterStatus struct {
// Status describes status of the cluster
type Status struct {
Team string
Cluster string
MasterService *v1.Service
+1
View File
@@ -460,6 +460,7 @@ func (c *Cluster) setSpec(newSpec *acidv1.Postgresql) {
c.specMu.Unlock()
}
// GetSpec returns cluster.Postgresql
func (c *Cluster) GetSpec() (*acidv1.Postgresql, error) {
c.specMu.RLock()
defer c.specMu.RUnlock()