瀏覽代碼

Fixed failing gofmt tests

utkarshcmu 10 年之前
父節點
當前提交
1952ebf7c4
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      pkg/api/dashboard_snapshot.go
  2. 3 3
      pkg/models/dashboard_snapshot.go
  3. 1 1
      pkg/services/sqlstore/dashboard_snapshot.go

+ 1 - 1
pkg/api/dashboard_snapshot.go

@@ -36,7 +36,7 @@ func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapsho
 		cmd.DeleteKey = util.GetRandomString(32)
 		cmd.DeleteKey = util.GetRandomString(32)
 		cmd.OrgId = c.OrgId
 		cmd.OrgId = c.OrgId
 		cmd.UserId = c.UserId
 		cmd.UserId = c.UserId
-    cmd.Name = c.Name
+		cmd.Name = c.Name
 		metrics.M_Api_Dashboard_Snapshot_Create.Inc(1)
 		metrics.M_Api_Dashboard_Snapshot_Create.Inc(1)
 	}
 	}
 
 

+ 3 - 3
pkg/models/dashboard_snapshot.go

@@ -25,7 +25,7 @@ type DashboardSnapshot struct {
 
 
 type CreateDashboardSnapshotCommand struct {
 type CreateDashboardSnapshotCommand struct {
 	Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
 	Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
-  Name      string                 `json:"name" binding:"Required"`
+	Name      string                 `json:"name" binding:"Required"`
 	Expires   int64                  `json:"expires"`
 	Expires   int64                  `json:"expires"`
 
 
 	// these are passed when storing an external snapshot ref
 	// these are passed when storing an external snapshot ref
@@ -33,8 +33,8 @@ type CreateDashboardSnapshotCommand struct {
 	Key       string `json:"key"`
 	Key       string `json:"key"`
 	DeleteKey string `json:"deleteKey"`
 	DeleteKey string `json:"deleteKey"`
 
 
-	OrgId  int64  `json:"-"`
-	UserId int64  `json:"-"`
+	OrgId  int64 `json:"-"`
+	UserId int64 `json:"-"`
 
 
 	Result *DashboardSnapshot
 	Result *DashboardSnapshot
 }
 }

+ 1 - 1
pkg/services/sqlstore/dashboard_snapshot.go

@@ -24,7 +24,7 @@ func CreateDashboardSnapshot(cmd *m.CreateDashboardSnapshotCommand) error {
 		}
 		}
 
 
 		snapshot := &m.DashboardSnapshot{
 		snapshot := &m.DashboardSnapshot{
-      Name:      cmd.Name,
+			Name:      cmd.Name,
 			Key:       cmd.Key,
 			Key:       cmd.Key,
 			DeleteKey: cmd.DeleteKey,
 			DeleteKey: cmd.DeleteKey,
 			OrgId:     cmd.OrgId,
 			OrgId:     cmd.OrgId,