Skip to content

Commit 97fbe3e

Browse files
committed
code changes
1 parent 8ad0b82 commit 97fbe3e

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

cmd/dragonctl/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
func main() {
1616
fmt.Println("this is dragonctl")
17-
17+
1818
data, err := os.ReadFile("/home/bigpod/test.yaml")
1919
if err != nil {
2020
fmt.Printf("Error reading file: %v\n", err)

cmd/k8s-kubeadm-token-server/main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import "fmt"
44

5-
6-
func main() {
7-
fmt.Println("this is k8s token api")
8-
}
5+
func main() {
6+
fmt.Println("this is k8s token api")
7+
}

cmd/scheduler/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ import (
1010

1111
func main() {
1212
fmt.Println("this is scheduler")
13-
}
13+
}

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ func GetProviderFactory(name string) (func(any) (any, error), bool) {
7878

7979
func init() {
8080
Register[ClusterSpecV1]("Cluster")
81-
}
81+
}

internal/config/decoder.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ type Object interface {
1212
GetKind() string
1313
GetName() string
1414
}
15+
1516
func (m *ConfigManifest) GetKind() string { return m.Kind }
1617
func (m *ConfigManifest) GetName() string { return m.Metadata.Name }
18+
1719
var registry = make(map[string]reflect.Type)
1820

1921
func Register[T any](kind string) {
@@ -56,4 +58,4 @@ func LoadManifest(data []byte) (*ConfigManifest, error) {
5658
m.Spec = reflect.ValueOf(specPtr).Elem().Interface()
5759

5860
return m, nil
59-
}
61+
}

internal/providers/aws/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ type Provider struct {
1414
// Ensure Provider implements CloudProvider
1515
var _ interfaces.CloudProvider = (*Provider)(nil)
1616

17-
func (p *Provider) Provision(ctx context.Context) (error) {
17+
func (p *Provider) Provision(ctx context.Context) error {
1818
fmt.Printf("[AWS] Provisioning instance with type %s (Spot: %v)\n", p.Config.InstanceType, p.Config.Spot)
1919
return nil
2020
}
21-
func (p *Provider) Check(ctx context.Context) (error) {
21+
func (p *Provider) Check(ctx context.Context) error {
2222
fmt.Printf("[AWS] Checking instance with type %s (Spot: %v)\n", p.Config.InstanceType, p.Config.Spot)
2323
return nil
2424
}

internal/providers/azure/provider.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ type Provider struct {
1414
// Ensure Provider implements CloudProvider
1515
var _ interfaces.CloudProvider = (*Provider)(nil)
1616

17-
func (p *Provider) Provision(ctx context.Context) (error) {
17+
func (p *Provider) Provision(ctx context.Context) error {
1818
fmt.Printf("[Azure] Provisioning instance with type %s (Spot: %v)\n", p.Config.InstanceType, p.Config.Spot)
1919
return nil
2020
}
21-
func (p *Provider) Check(ctx context.Context) (error) {
21+
func (p *Provider) Check(ctx context.Context) error {
2222
fmt.Printf("[Azure] Checking instance with type %s (Spot: %v)\n", p.Config.InstanceType, p.Config.Spot)
2323
return nil
2424
}
@@ -42,4 +42,3 @@ func (p *Provider) RestartInstances(ctx context.Context) error {
4242
fmt.Printf("[Azure] Restarting instances\n")
4343
return nil
4444
}
45-

0 commit comments

Comments
 (0)