Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
DRuggeri committed Jun 22, 2020
1 parent 863a5e8 commit 579232e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion restapi/datasource_api_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestAccRestapiobject_Basic(t *testing.T) {
copy_keys: make([]string, 0),
write_returns_object: false,
create_returns_object: false,
debug: debug,
debug: debug,
}
client, err := NewAPIClient(opt)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion restapi/import_api_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestAccRestApiObject_importBasic(t *testing.T) {
copy_keys: make([]string, 0),
write_returns_object: false,
create_returns_object: false,
debug: debug,
debug: debug,
}
client, err := NewAPIClient(opt)
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions restapi/resource_api_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ func resourceRestApiImport(d *schema.ResourceData, meta interface{}) (imported [

hasTrailingSlash := strings.LastIndex(input, "/") == len(input)-1
var n int
if (hasTrailingSlash) {
n = strings.LastIndex(input[0 : len(input) - 1], "/")
if hasTrailingSlash {
n = strings.LastIndex(input[0:len(input)-1], "/")
} else {
n = strings.LastIndex(input, "/")
}
Expand All @@ -147,10 +147,10 @@ func resourceRestApiImport(d *schema.ResourceData, meta interface{}) (imported [
d.Set("path", path)

var id string
if (hasTrailingSlash) {
id = input[n + 1 : len(input) - 1]
if hasTrailingSlash {
id = input[n+1 : len(input)-1]
} else {
id = input[n + 1 : len(input)]
id = input[n+1 : len(input)]
}

d.Set("data", fmt.Sprintf(`{ "id": "%s" }`, id))
Expand Down
2 changes: 1 addition & 1 deletion restapi/resource_api_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestAccRestApiObject_Basic(t *testing.T) {
copy_keys: make([]string, 0),
write_returns_object: false,
create_returns_object: false,
debug: debug,
debug: debug,
}
client, err := NewAPIClient(opt)
if err != nil {
Expand Down

0 comments on commit 579232e

Please sign in to comment.