Skip to content

Commit

Permalink
Update programs.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilliams0305 committed Dec 11, 2023
1 parent 3d4dbd6 commit 2c2b021
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vc/programs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func getProgramLibrary(vc *VC) (ProgramsLibrary, VirtualControlError) {
// UPLOADS A NEW PROGRAM TO THE APPLIANCE
func postProgram(vc *VC, options ProgramOptions) (status int, err error) {

if !strings.HasSuffix(options.AppFile, ".cpz") || !strings.HasSuffix(options.AppFile, ".cpz"){
if !strings.HasSuffix(options.appFile, ".cpz") || !strings.HasSuffix(options.appFile, ".cpz"){
return 0, errors.New("")
}

file, err := os.Open(options.AppFile)
file, err := os.Open(options.appFile)

Check failure on line 38 in vc/programs.go

View workflow job for this annotation

GitHub Actions / build

undefined: os
if err != nil {
return 0, err
}
Expand All @@ -44,7 +44,7 @@ func postProgram(vc *VC, options ProgramOptions) (status int, err error) {
body := &bytes.Buffer{}

Check failure on line 44 in vc/programs.go

View workflow job for this annotation

GitHub Actions / build

undefined: bytes
writer := multipart.NewWriter(body)

Check failure on line 45 in vc/programs.go

View workflow job for this annotation

GitHub Actions / build

undefined: multipart

part, err := writer.CreateFormFile("file", options.AppFile)
part, err := writer.CreateFormFile("file", options.appFile)
if err != nil {
return 0, err
}
Expand All @@ -57,7 +57,7 @@ func postProgram(vc *VC, options ProgramOptions) (status int, err error) {
file.Close()

addFormField(writer, "FriendlyName", options.name)

Check failure on line 59 in vc/programs.go

View workflow job for this annotation

GitHub Actions / build

undefined: addFormField
addFormField(writer, "Manufacturer", options.notes)
addFormField(writer, "Notes", options.notes)

Check failure on line 60 in vc/programs.go

View workflow job for this annotation

GitHub Actions / build

undefined: addFormField

err = writer.Close()
if err != nil {
Expand Down

0 comments on commit 2c2b021

Please sign in to comment.