refactor (#283)
This commit is contained in:
@@ -26,6 +26,7 @@ const (
|
||||
|
||||
type Plugin struct {
|
||||
Api *spec.ApiSpec
|
||||
ApiFilePath string
|
||||
Style string
|
||||
Dir string
|
||||
}
|
||||
@@ -86,6 +87,12 @@ func prepareArgs(c *cli.Context) ([]byte, error) {
|
||||
transferData.Api = api
|
||||
}
|
||||
|
||||
absApiFilePath, err := filepath.Abs(apiPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
transferData.ApiFilePath = absApiFilePath
|
||||
dirAbs, err := filepath.Abs(c.String("dir"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user