From bf8bf3a9108596463b3be9e55755cae7fdc8a75f Mon Sep 17 00:00:00 2001 From: TangBin Date: Sat, 11 May 2019 18:12:23 +0800 Subject: [PATCH] fix CopyRight to Copyright --- cmd/climc/shell/copyright.go | 6 +++--- pkg/mcclient/modules/mod_copyright.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/climc/shell/copyright.go b/cmd/climc/shell/copyright.go index a4616a6caa..71c9342401 100644 --- a/cmd/climc/shell/copyright.go +++ b/cmd/climc/shell/copyright.go @@ -23,12 +23,12 @@ import ( ) func init() { - type CopyRightUpdateOptions struct { + type CopyrightUpdateOptions struct { Copyright string `help:"The copyright"` Email string `help:"The Email"` } - R(&CopyRightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyRightUpdateOptions) error { + R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error { if !s.HasSystemAdminPrivilege() { return fmt.Errorf("require admin privilege") } @@ -42,7 +42,7 @@ func init() { params.Add(jsonutils.NewString(args.Email), "email") } - r, err := modules.CopyRight.Create(s, params) + r, err := modules.Copyright.Create(s, params) if err != nil { return err } diff --git a/pkg/mcclient/modules/mod_copyright.go b/pkg/mcclient/modules/mod_copyright.go index bb7c3f4ff0..fb09cb1b84 100644 --- a/pkg/mcclient/modules/mod_copyright.go +++ b/pkg/mcclient/modules/mod_copyright.go @@ -1,16 +1,16 @@ package modules -type CopyRightManager struct { +type CopyrightManager struct { ResourceManager } var ( - CopyRight CopyRightManager + Copyright CopyrightManager ) func init() { - CopyRight = CopyRightManager{NewYunionAgentManager("info", "infos", + Copyright = CopyrightManager{NewYunionAgentManager("info", "infos", []string{"copyright", "email"}, []string{})} - register(&CopyRight) + register(&Copyright) }