v48.2.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 10 Imported by: 0




This section is empty.


This section is empty.


func ExpandChangedDirectories

func ExpandChangedDirectories(changedFiles []string) ([]string, error)

ExpandChangedDirectories expands every directory listed in the array to all its file

func IsValidPackage

func IsValidPackage(dir string) bool

IsValidPackage returns true when the given directory is a valid azure-sdk-for-go package, otherwise returns false (including the directory does not exist) The criteria of a valid azure-sdk-for-go package is that the directory must have a `client.go` and a `version.go` file


type ChangedPackagesMap

type ChangedPackagesMap map[string][]string

ChangedPackagesMap is a wrapper of a map of packages. The key is package names, and the value is the changed file list.

func GetChangedPackages

func GetChangedPackages(changedFiles []string) (ChangedPackagesMap, error)

GetChangedPackages get the go SDK packages map from the given changed file list. the map returned has the package full path as key, and the changed files in the package as the value. This function identify the package by checking if a directory has both a `version.go` file and a `client.go` file.

func (*ChangedPackagesMap) String

func (c *ChangedPackagesMap) String() string

type Options

type Options struct {
	// AutorestArguments are the optional flags for the autorest tool
	AutorestArguments []string
	// AfterScripts are the scripts that need to be run after the SDK is generated
	AfterScripts []string

Options describes the options used in an autorest task

func NewOptionsFrom

func NewOptionsFrom(reader io.Reader) (*Options, error)

NewOptionsFrom returns a new options from a io.Reader

func (Options) String

func (o Options) String() string

String ...

type Task

type Task struct {
	// AbsReadmeMd absolute path of the file to generate
	AbsReadmeMd string

Task describes a generation task

func (*Task) Execute

func (t *Task) Execute(options Options) error

Execute executes the autorest task, and then invoke the after scripts the error returned will be TaskError

type TaskError

type TaskError struct {
	// AbsReadmeMd relative path of the file to generate
	AbsReadmeMd string
	// Script the script running when the error is thrown
	Script string
	// Message the error message
	Message string

TaskError the error returned during an autorest task

func (*TaskError) Error

func (r *TaskError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL