mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
Style fixes. #96
This commit is contained in:
+2
-1
@@ -203,7 +203,7 @@ func (context *AptlyContext) PackagePool() aptly.PackagePool {
|
|||||||
return context.packagePool
|
return context.packagePool
|
||||||
}
|
}
|
||||||
|
|
||||||
// PublishedStorage returns instance of PublishedStorage
|
// GetPublishedStorage returns instance of PublishedStorage
|
||||||
func (context *AptlyContext) GetPublishedStorage(name string) aptly.PublishedStorage {
|
func (context *AptlyContext) GetPublishedStorage(name string) aptly.PublishedStorage {
|
||||||
publishedStorage, ok := context.publishedStorages[name]
|
publishedStorage, ok := context.publishedStorages[name]
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -230,6 +230,7 @@ func (context *AptlyContext) GetPublishedStorage(name string) aptly.PublishedSto
|
|||||||
return publishedStorage
|
return publishedStorage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateFlags sets internal copy of flags in the context
|
||||||
func (context *AptlyContext) UpdateFlags(flags *flag.FlagSet) {
|
func (context *AptlyContext) UpdateFlags(flags *flag.FlagSet) {
|
||||||
context.flags = flags
|
context.flags = flags
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -5,7 +5,8 @@ import (
|
|||||||
"github.com/smira/commander"
|
"github.com/smira/commander"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run(cmd *commander.Command, cmd_args []string, initContext bool) (returnCode int) {
|
// Run runs single command starting from root cmd with args, optionally initializing context
|
||||||
|
func Run(cmd *commander.Command, cmdArgs []string, initContext bool) (returnCode int) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
fatal, ok := r.(*FatalError)
|
fatal, ok := r.(*FatalError)
|
||||||
@@ -19,7 +20,7 @@ func Run(cmd *commander.Command, cmd_args []string, initContext bool) (returnCod
|
|||||||
|
|
||||||
returnCode = 0
|
returnCode = 0
|
||||||
|
|
||||||
flags, args, err := cmd.ParseFlags(cmd_args)
|
flags, args, err := cmd.ParseFlags(cmdArgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatal(err)
|
Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user