Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Aug 17, 2023
1 parent 931ccde commit b9cf2f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
8 changes: 1 addition & 7 deletions samples/convert_file/convert_file.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"encoding/base64"
"fmt"
"os"

Expand Down Expand Up @@ -30,11 +29,6 @@ func main() {
fmt.Println("File conversion id: ", fc.ID)
fmt.Println("File conversion status: ", fc.Status)

decoded, err := base64.StdEncoding.DecodeString(fc.Output.String())
if err != nil {
panic(err)
}

// LITTERBOX-START-NON-EDITABLE-SECTION
output_file_path := "./output.stl"
fmt.Println("Saving output to ", output_file_path)
Expand All @@ -45,7 +39,7 @@ func main() {
}
defer output.Close()

if _, err := output.Write(decoded); err != nil {
if _, err := output.Write(fc.Output.Inner); err != nil {
panic(err)
}
if err := output.Sync(); err != nil {
Expand Down
8 changes: 1 addition & 7 deletions tutorials/conversion_obj_step/conversion_obj_step.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"encoding/base64"
"fmt"
"os"

Expand Down Expand Up @@ -30,11 +29,6 @@ func main() {
fmt.Println("File conversion id: ", fc.ID)
fmt.Println("File conversion status: ", fc.Status)

decoded, err := base64.StdEncoding.DecodeString(fc.Output.String())
if err != nil {
panic(err)
}

output_file_path := "./output.step"
fmt.Println("Saving output to ", output_file_path)

Expand All @@ -44,7 +38,7 @@ func main() {
}
defer output.Close()

if _, err := output.Write(decoded); err != nil {
if _, err := output.Write(fc.Output.Inner); err != nil {
panic(err)
}
if err := output.Sync(); err != nil {
Expand Down
8 changes: 1 addition & 7 deletions tutorials/conversion_obj_stl/conversion_obj_stl.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"encoding/base64"
"fmt"
"os"

Expand Down Expand Up @@ -31,11 +30,6 @@ func main() {
fmt.Println("File conversion id: ", fc.ID)
fmt.Println("File conversion status: ", fc.Status)

decoded, err := base64.StdEncoding.DecodeString(fc.Output.String())
if err != nil {
panic(err)
}

// LITTERBOX-START-NON-EDITABLE-SECTION
output_file_path := "./output.stl"
fmt.Println("Saving output to ", output_file_path)
Expand All @@ -46,7 +40,7 @@ func main() {
}
defer output.Close()

if _, err := output.Write(decoded); err != nil {
if _, err := output.Write(fc.Output.Inner); err != nil {
panic(err)
}
if err := output.Sync(); err != nil {
Expand Down

0 comments on commit b9cf2f4

Please sign in to comment.