Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

client.Authentication undefined (type *travis.Client has no field or method Authentication) #77

Closed
probonopd opened this issue May 2, 2020 · 2 comments

Comments

@probonopd
Copy link

Something broke recently, causing my application to no longer compile.

client.Authentication undefined (type *travis.Client has no field or method Authentication)

Full build log:
https://api.travis-ci.com/v3/job/326497867/log.txt

@probonopd
Copy link
Author

This is the code I had so far:

	fmt.Println("Repositories can be on travis.com or on travis.org")
	fmt.Println("Is your repository on travis.com? Answer 'no' if org (yes/no)")
	var client *travis.Client
	if AskForConfirmation() == true {
		client = travis.NewClient(travis.ApiComUrl, "")
	} else {
		client = travis.NewClient(travis.ApiOrgUrl, "")
	}
	_, response, err := client.Authentication.UsingGithubToken(context.Background(), token)

Looking at https://github.com/shuheiktgw/go-travis#usage, we now need to use

	if AskForConfirmation() == true {
		client = travis.NewClient(travis.ApiComUrl, token)
	} else {
		client = travis.NewClient(travis.ApiOrgUrl, token)
	}

?

probonopd added a commit to probonopd/go-appimage that referenced this issue May 2, 2020
@probonopd
Copy link
Author

Seemingly this has solved the compilation issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant