Skip to content

Commit

Permalink
use sed to replace lingering golinode references
Browse files Browse the repository at this point in the history
  • Loading branch information
displague committed May 23, 2018
1 parent 130f477 commit 84d17e2
Show file tree
Hide file tree
Showing 50 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion account.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

type Account struct {
FirstName string `json:"first_name"`
Expand Down
2 changes: 1 addition & 1 deletion account_events.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion account_invoices.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion account_notifications.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion backups.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion backups_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"testing"
Expand Down
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand All @@ -16,7 +16,7 @@ const (
APIVersion = "v4"
// APIProto connect to API with http(s)
APIProto = "https"
// Version of golinode
// Version of linodego
Version = "1.0.0"
// APIEnvVar environment var to check for API token
APIEnvVar = "LINODE_TOKEN"
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion domain_records.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion domains.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
8 changes: 4 additions & 4 deletions errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand All @@ -18,7 +18,7 @@ const (
ErrorFromStringer = 3
)

// Error wraps the GoLinode error with the relevant http.Response
// Error wraps the LinodeGo error with the relevant http.Response
type Error struct {
Response *http.Response
Code int
Expand Down Expand Up @@ -71,7 +71,7 @@ func (g Error) Error() string {
return fmt.Sprintf("[%03d] %s", g.Code, g.Message)
}

// NewError creates a golinode.Error with a Code identifying the source err type,
// NewError creates a linodego.Error with a Code identifying the source err type,
// - ErrorFromString (1) from a string
// - ErrorFromError (2) for an error
// - ErrorFromStringer (3) for a Stringer
Expand Down Expand Up @@ -103,7 +103,7 @@ func NewError(err interface{}) *Error {
case fmt.Stringer:
return &Error{Code: ErrorFromStringer, Message: e.String()}
default:
log.Fatalln("Unsupported type to golinode.NewError")
log.Fatalln("Unsupported type to linodego.NewError")
panic(err)
}
}
20 changes: 10 additions & 10 deletions example/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func ExampleListTypes_all() {
func ExampleGetType_missing() {
_, err := linodeClient.GetType("missing-type")
if err != nil {
if v, ok := err.(*golinode.Error); ok {
if v, ok := err.(*linodego.Error); ok {
fmt.Println("Request was:", v.Response.Request.URL)
fmt.Println("Response was:", v.Response.Status)
fmt.Println("Error was:", v)
Expand Down Expand Up @@ -64,7 +64,7 @@ func ExampleListKernels_all() {
}

func ExampleListKernels_allWithOpts() {
filterOpt := golinode.NewListOptions(0, "")
filterOpt := linodego.NewListOptions(0, "")
kernels, err := linodeClient.ListKernels(filterOpt)
if err != nil {
log.Fatal(err)
Expand All @@ -83,7 +83,7 @@ func ExampleListKernels_allWithOpts() {
}

func ExampleListKernels_filtered() {
filterOpt := golinode.ListOptions{Filter: "{\"label\":\"Recovery - Finnix (kernel)\"}"}
filterOpt := linodego.ListOptions{Filter: "{\"label\":\"Recovery - Finnix (kernel)\"}"}
kernels, err := linodeClient.ListKernels(&filterOpt)
if err != nil {
log.Fatal(err)
Expand All @@ -98,7 +98,7 @@ func ExampleListKernels_filtered() {
}

func ExampleListKernels_page1() {
filterOpt := golinode.NewListOptions(1, "")
filterOpt := linodego.NewListOptions(1, "")
kernels, err := linodeClient.ListKernels(filterOpt)
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -145,7 +145,7 @@ func ExampleGetKernel_specific() {
func ExampleGetImage_missing() {
_, err := linodeClient.GetImage("not-found")
if err != nil {
if v, ok := err.(*golinode.Error); ok {
if v, ok := err.(*linodego.Error); ok {
fmt.Println("Request was:", v.Response.Request.URL)
fmt.Println("Response was:", v.Response.Status)
fmt.Println("Error was:", v)
Expand All @@ -158,7 +158,7 @@ func ExampleGetImage_missing() {
// Error was: [404] Not found
}
func ExampleListImages_all() {
filterOpt := golinode.NewListOptions(0, "")
filterOpt := linodego.NewListOptions(0, "")
images, err := linodeClient.ListImages(filterOpt)
if err != nil {
log.Fatal(err)
Expand All @@ -175,7 +175,7 @@ func ExampleListImages_all() {
// ExampleListImages_notfound demonstrates that an empty slice is returned,
// not an error, when a filter matches no results.
func ExampleListImages_notfound() {
filterOpt := golinode.ListOptions{Filter: "{\"label\":\"not-found\"}"}
filterOpt := linodego.ListOptions{Filter: "{\"label\":\"not-found\"}"}
images, err := linodeClient.ListImages(&filterOpt)
if err != nil {
log.Fatal(err)
Expand All @@ -187,9 +187,9 @@ func ExampleListImages_notfound() {
}

// ExampleListImages_notfound demonstrates that an error is returned by
// the API and golinode when an invalid filter is provided
// the API and linodego when an invalid filter is provided
func ExampleListImages_badfilter() {
filterOpt := golinode.ListOptions{Filter: "{\"foo\":\"bar\"}"}
filterOpt := linodego.ListOptions{Filter: "{\"foo\":\"bar\"}"}
images, err := linodeClient.ListImages(&filterOpt)
if err == nil {
log.Fatal(err)
Expand All @@ -203,7 +203,7 @@ func ExampleListImages_badfilter() {
}

func ExampleListLongviewSubscriptions_page1() {
pageOpt := golinode.ListOptions{PageOptions: &golinode.PageOptions{Page: 1}}
pageOpt := linodego.ListOptions{PageOptions: &linodego.PageOptions{Page: 1}}
subscriptions, err := linodeClient.ListLongviewSubscriptions(&pageOpt)
if err != nil {
log.Fatal(err)
Expand Down
10 changes: 5 additions & 5 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/chiefy/linodego"
)

var linodeClient = golinode.NewClient(nil, nil)
var linodeClient = linodego.NewClient(nil, nil)
var spendMoney = false

func main() {
Expand All @@ -27,7 +27,7 @@ func main() {
}

// Demonstrate endpoints that require an access token
linodeClient = golinode.NewClient(&apiToken, nil)
linodeClient = linodego.NewClient(&apiToken, nil)
if err != nil {
log.Fatal(err)
}
Expand All @@ -36,14 +36,14 @@ func main() {
}

func moreExamples_authenticated() {
var linode *golinode.Instance
var linode *linodego.Instance

linode, err := linodeClient.GetInstance(1231)
fmt.Println("## Instance request with Invalid ID")
fmt.Println("### Linode\n", linode, "\n### Error\n", err)

if spendMoney {
linode, err = linodeClient.CreateInstance(&golinode.InstanceCreateOptions{Region: "us-central", Type: "g5-nanode-1"})
linode, err = linodeClient.CreateInstance(&linodego.InstanceCreateOptions{Region: "us-central", Type: "g5-nanode-1"})
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -125,7 +125,7 @@ func moreExamples_authenticated() {
fmt.Println("### No Volumes")
}

stackscripts, err := linodeClient.ListStackscripts(&golinode.ListOptions{Filter: "{\"mine\":true}"})
stackscripts, err := linodeClient.ListStackscripts(&linodego.ListOptions{Filter: "{\"mine\":true}"})
if err != nil {
log.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion images.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion images_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion instance_configs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion instance_disks.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion instance_ips.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion instance_snapshots.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion instance_volumes.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion instances.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion instances_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion kernels.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion longview.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion longview_subscriptions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion managed.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package golinode
package linodego
2 changes: 1 addition & 1 deletion network_ips.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion network_pools.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion network_ranges.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion nodebalancer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion nodebalancer_config_nodes.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion nodebalancer_configs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion pagination.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

/**
* Pagination and Filtering types and helpers
Expand Down
2 changes: 1 addition & 1 deletion profile.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package golinode
package linodego
2 changes: 1 addition & 1 deletion regions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion regions_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion resources.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion resources_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion snapshots_test.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package golinode
package linodego
2 changes: 1 addition & 1 deletion stackscripts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion stackscripts_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import "testing"

Expand Down
2 changes: 1 addition & 1 deletion support.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golinode
package linodego

import (
"fmt"
Expand Down
Loading

0 comments on commit 84d17e2

Please sign in to comment.