#khalid-go-import
1 messages ยท Page 1 of 1 (latest)
Hello! Can you provide more details? What does "doesn't work for me" mean? Are you getting an error? Is it running but you're getting an unexpected result? Something else?
I'm sorry, I should have said that go is saying it doesn't exist
could not import github.com/stripe/stripe-go/v74/client (no required module provides package "github.com/stripe/stripe-go/v74/client")
Ah, maybe you're using a Go workspace and you need to use go work use?
no, its a standard go project, I can provide my go mod if it helps
Let me see if I can find someone better at Go than I am, one sec... ๐
thank you
khalid-go-import
@civic nimbus have you used stripe-go before?
Like the code you pasted is not "real code" you have to replace $Resource$ for example
yes, I've been working with it for at least 6 months now
that code for $resource could be Customer Subscription etc
which version of stripe-go are you using exactly right now?
the same one in the link v74.30.0
basically I have customers on an old stripe account I want to create new accounts for. I figured using the client api I would be able to do it
I installed doing go get -u github.com/stripe/stripe-go/v74 months ago
Okay then I tried ```package main
import (
"fmt"
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
)
func main() {
sc := &client.API{}
sc.Init("sk_test_4eC39HqLyjWDarjtT1zdp7dc", nil)
params := &stripe.CustomerParams{
Email: stripe.String("test@example.com"),
}
cus, _ := sc.Customers.New(params)
fmt.Printf("Got: \n", cus)
}
how did you install it? checking my vendor the package doesn't exist
I don't know what that last sentence means. What are you checking? And I just did go get -u github.com/stripe/stripe-go/v74 to get your version since I had 76 installed before
hmmm I will close this ticket since now I know this has nothing to do with stripe itself. Thank you