twilio / twilio-go

A Go package for communicating with the Twilio API.
MIT License
278 stars 40 forks source link

Unable to import this #133

Closed fullstacked closed 2 years ago

fullstacked commented 2 years ago

Issue Summary

I'm trying to use this in my code. After initializing my mod, I'm running

go get github.com/twilio/twilio-go

But getting the below response

go get: module github.com/twilio/twilio-go: Get "https://proxy.golang.org/github.com/twilio/twilio-go/@v/list": dial tcp: i/o timeout

Code Snippet

package main

import twilio "github.com/twilio/twilio-go" import openapi "github.com/twilio/twilio-go/rest/api/v2010" import "os" import "fmt"

func main() { client := twilio.NewRestClient()

params := &openapi.CreateMessageParams{}
params.SetTo(os.Getenv("To Number"))
params.SetFrom(os.Getenv("From Number"))
params.SetBody("Hello from Golang!")

_, err := client.ApiV2010.CreateMessage(params)
if err != nil {
    fmt.Println(err.Error())
} else {
    fmt.Println("SMS sent successfully!")
}

}

Exception/Log

go get: module github.com/twilio/twilio-go: Get "https://proxy.golang.org/github.com/twilio/twilio-go/@v/list": dial tcp: i/o timeout

eshanholtz commented 2 years ago

Hi @fullstacked

I'm unable to reproduce the timeout error you're seeing when you try to install this library as a module, and I'm able to successfully send an SMS with the code you provided. I don't think this is an issue on our end. Are you having trouble installing any other modules?

eshanholtz commented 2 years ago

Closing due to lack of customer response.