func ExampleCodeCommit_DeleteRepository() { svc := codecommit.New(session.New()) params := &codecommit.DeleteRepositoryInput{ RepositoryName: aws.String("RepositoryName"), // Required } resp, err := svc.DeleteRepository(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodeCommit_GetBranch() { svc := codecommit.New(session.New()) params := &codecommit.GetBranchInput{ BranchName: aws.String("BranchName"), RepositoryName: aws.String("RepositoryName"), } resp, err := svc.GetBranch(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodeCommit_ListRepositories() { svc := codecommit.New(session.New()) params := &codecommit.ListRepositoriesInput{ NextToken: aws.String("NextToken"), Order: aws.String("OrderEnum"), SortBy: aws.String("SortByEnum"), } resp, err := svc.ListRepositories(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodeCommit_BatchGetRepositories() { svc := codecommit.New(session.New()) params := &codecommit.BatchGetRepositoriesInput{ RepositoryNames: []*string{ // Required aws.String("RepositoryName"), // Required // More values... }, } resp, err := svc.BatchGetRepositories(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func init() { Before("@codecommit", func() { World["client"] = codecommit.New(smoke.Session) }) }