diff --git a/.github/workflows/buidl-win.yaml b/.github/workflows/buidl-win.yaml deleted file mode 100644 index 61e090f..0000000 --- a/.github/workflows/buidl-win.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Generate windows mmt artifacts - -# on events -on: [push, pull_request] - -# workflow tasks -jobs: - generate: - name: Generate cross-platform builds - runs-on: ubuntu-latest - steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - name: Generate build files - uses: thatisuday/go-cross-build@v1 - with: - platforms: "windows/amd64" - package: "" - name: "mmt" - compress: "false" - dest: "dist-win" - - name: Upload assets - uses: actions/upload-artifact@v2 - with: - name: mmt-win - path: dist-win/* diff --git a/.github/workflows/buidl.yaml b/.github/workflows/buidl.yaml deleted file mode 100644 index 652de49..0000000 --- a/.github/workflows/buidl.yaml +++ /dev/null @@ -1,35 +0,0 @@ -on: [push, pull_request] -name: Build Mac OS X/Linux -on: - push: - tags: - - '*' -jobs: - build: - name: GoReleaser build - runs-on: ubuntu-latest - - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - with: - fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ - - - name: Set up Go 1.18 - uses: actions/setup-go@v2 - with: - go-version: 1.18 - id: go - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@master - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload assets - uses: actions/upload-artifact@v2 - with: - name: mmt - path: dist/* diff --git a/.github/workflows/build-artifacts.yaml b/.github/workflows/build-artifacts.yaml new file mode 100644 index 0000000..e424ec0 --- /dev/null +++ b/.github/workflows/build-artifacts.yaml @@ -0,0 +1,36 @@ +name: Build and release artifacts +on: + release: + types: + - created + +jobs: + generate: + name: Generate cross-platform builds + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Generate build files + uses: thatisuday/go-cross-build@v1 + with: + platforms: "linux/amd64, darwin/amd64, windows/amd64" + package: "mmt" + name: "mmt" + compress: "false" + dest: "dist" + - name: Upload assets for Windows + uses: actions/upload-artifact@v2 + with: + name: mmt-win + path: dist-win/* + - name: Upload assets for Linux + uses: actions/upload-artifact@v2 + with: + name: mmt-linux + path: dist-linux/* + - name: Upload assets for Mac OS + uses: actions/upload-artifact@v2 + with: + name: mmt-darwin + path: dist-darwin/* diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..335a7b3 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,17 @@ +name: Build only +on: + push: + branches: [ "master", "development" ] + pull_request: + branches: [ "master", "development" ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + - name: Build + run: go build -v ./... \ No newline at end of file diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..74fa71e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,19 @@ +name: Lint +on: + push: + pull_request: +permissions: + contents: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest diff --git a/cmd/helper.go b/cmd/helper.go index 0dd015b..2fa793e 100644 --- a/cmd/helper.go +++ b/cmd/helper.go @@ -10,53 +10,58 @@ import ( func get_flag_string(cmd *cobra.Command, name string) string { value, err := cmd.Flags().GetString(name) - if err != nil { - cui.Error("Problem parsing "+name, err) - } - if value == "" { - value = viper.GetString(name) - } - return value + if err != nil { + cui.Error("Problem parsing "+name, err) + } + if value == "" { + value = viper.GetString(name) + } + return value } func get_flag_slice(cmd *cobra.Command, name string) []string { value, err := cmd.Flags().GetStringSlice(name) - if err != nil { - cui.Error("Problem parsing "+name, err) - } - if len(value) == 0 { - value = viper.GetStringSlice(name) - } - return value + if err != nil { + cui.Error("Problem parsing "+name, err) + } + if len(value) == 0 { + value = viper.GetStringSlice(name) + } + return value } func get_flag_int(cmd *cobra.Command, name string, default_int string) int { value, err := cmd.Flags().GetString(name) - if err != nil { - cui.Error("Problem parsing "+name, err) - } - if value == "" { - value = viper.GetString(name) - } - if value == "" { - value = default_int - } - int1, err := strconv.Atoi(value) - return int1 + if err != nil { + cui.Error("Problem parsing "+name, err) + } + if value == "" { + value = viper.GetString(name) + } + if value == "" { + value = default_int + } + int1, err := strconv.Atoi(value) + if err != nil { + cui.Error("Problem parsing "+value, err) + } + return int1 } func get_flag_bool(cmd *cobra.Command, name string, default_bool string) bool { value, err := cmd.Flags().GetString(name) - if err != nil { - cui.Error("Problem parsing "+name, err) - } - if value == "" { - value = viper.GetString(name) - } - if value == "" { - value = default_bool - } - bool1, err := strconv.ParseBool(value) - return bool1 + if err != nil { + cui.Error("Problem parsing "+name, err) + } + if value == "" { + value = viper.GetString(name) + } + if value == "" { + value = default_bool + } + bool1, err := strconv.ParseBool(value) + if err != nil { + cui.Error("Problem parsing "+value, err) + } + return bool1 } - diff --git a/cmd/import.go b/cmd/import.go index 7dd2cb7..9216346 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -22,19 +22,25 @@ var importCmd = &cobra.Command{ Use: "import", Short: "Import media", Run: func(cmd *cobra.Command, args []string) { - input := get_flag_string(cmd, "input") - output := get_flag_string(cmd, "output") - camera := get_flag_string(cmd, "camera") - projectName := get_flag_string(cmd, "name") + input := get_flag_string(cmd, "input") + output := get_flag_string(cmd, "output") + camera := get_flag_string(cmd, "camera") + projectName := get_flag_string(cmd, "name") if projectName != "" { - os.Mkdir(filepath.Join(output, projectName), 0755) + _, err := os.Stat(filepath.Join(output, projectName)) + if os.IsNotExist(err) { + err := os.Mkdir(filepath.Join(output, projectName), 0755) + if err != nil { + cui.Error("Something went wrong creating project dir", err) + } + } } - dateFormat := get_flag_string(cmd, "date") - bufferSize := get_flag_int(cmd, "buffer", "1000") - prefix := get_flag_string(cmd, "prefix") - dateRange := get_flag_slice(cmd, "range") + dateFormat := get_flag_string(cmd, "date") + bufferSize := get_flag_int(cmd, "buffer", "1000") + prefix := get_flag_string(cmd, "prefix") + dateRange := get_flag_slice(cmd, "range") if camera != "" && output != "" { c, err := utils.CameraGet(camera) @@ -44,16 +50,16 @@ var importCmd = &cobra.Command{ customCameraOpts := make(map[string]interface{}) if c == utils.GoPro { - skipAuxFiles := get_flag_bool(cmd, "skip_aux", "true") - customCameraOpts["skip_aux"] = skipAuxFiles - sortBy := get_flag_slice(cmd, "sort_by") - if len(sortBy) > 0 { - customCameraOpts["sort_by"] = []string{"camera", "days"} - } - - connection := get_flag_string(cmd, "connection") + skipAuxFiles := get_flag_bool(cmd, "skip_aux", "true") + customCameraOpts["skip_aux"] = skipAuxFiles + sortBy := get_flag_slice(cmd, "sort_by") + if len(sortBy) > 0 { + customCameraOpts["sort_by"] = []string{"camera", "days"} + } + + connection := get_flag_string(cmd, "connection") if connection == "" { - connection = "sd_card" + connection = "sd_card" } customCameraOpts["connection"] = connection } @@ -80,7 +86,7 @@ var importCmd = &cobra.Command{ } return } - color.Red("Error: required flag(s) \"camera\", \"output\" not set") + color.Red("Error: required flag(s) \"camera\", \"output\" not set") }, } diff --git a/cmd/update.go b/cmd/update.go index ab56795..88f4bf7 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -12,8 +12,8 @@ var updateCmd = &cobra.Command{ Use: "update", Short: "Update camera firmware", Run: func(cmd *cobra.Command, args []string) { - input := get_flag_string(cmd, "input") - camera := get_flag_string(cmd, "camera") + input := get_flag_string(cmd, "input") + camera := get_flag_string(cmd, "camera") c, err := utils.CameraGet(camera) if err != nil { cui.Error("Something went wrong", err) @@ -24,14 +24,12 @@ var updateCmd = &cobra.Command{ if err != nil { cui.Error("Something went wrong", err) } - break case utils.Insta360: - model := get_flag_string(cmd, "model") + model := get_flag_string(cmd, "model") err = insta360.UpdateCamera(input, model) if err != nil { cui.Error("Something went wrong", err) } - break } }, diff --git a/pkg/android/android.go b/pkg/android/android.go index d6f31b0..d0c0b8e 100644 --- a/pkg/android/android.go +++ b/pkg/android/android.go @@ -97,7 +97,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange dayFolder := filepath.Join(out, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } deviceInfo, err := device.DeviceInfo() @@ -105,7 +105,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange return nil, err } if _, err := os.Stat(filepath.Join(dayFolder, deviceInfo.Product)); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, deviceInfo.Product), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, deviceInfo.Product), 0755) } dayFolder = filepath.Join(dayFolder, deviceInfo.Product) diff --git a/pkg/dji/dji.go b/pkg/dji/dji.go index c564892..66c036b 100644 --- a/pkg/dji/dji.go +++ b/pkg/dji/dji.go @@ -41,6 +41,11 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange ) mediaFolder := `\d+MEDIA` + mediaFolderRegex, err := regexp.Compile(mediaFolder) + if err != nil { + return nil, err + } + panoramaFolder := "PANORAMA" fileTypes := []FileTypeMatch{ @@ -140,7 +145,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange dayFolder := filepath.Join(out, mediaDate, getDeviceName(), "photos/panoramas") if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } err = utils.CopyDir(filepath.Join(root, panoramaFolder, panoramaId.Name()), filepath.Join(dayFolder, panoramaId.Name()), bufferSize) if err != nil { @@ -154,10 +159,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange } - r, err := regexp.MatchString(mediaFolder, f.Name()) - if err != nil { - result.Errors = append(result.Errors, err) - } + r := mediaFolderRegex.MatchString(f.Name()) if !r { continue } @@ -223,11 +225,11 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange dayFolder := filepath.Join(out, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if _, err := os.Stat(filepath.Join(dayFolder, getDeviceName())); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, getDeviceName()), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, getDeviceName()), 0755) } dayFolder = filepath.Join(dayFolder, getDeviceName()) @@ -282,15 +284,9 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange if is { s = matchDeviceName } - err = os.Rename(dayFolder, strings.Replace(dayFolder, DeviceName, s, 1)) - if err != nil { - - // Could be a folder allready exists... time to move the content to that folder. + _ = os.Rename(dayFolder, strings.Replace(dayFolder, DeviceName, s, 1)) // Could be a folder already exists... time to move the content to that folder. - } DeviceName = s - - break case Video, Subtitle: x := de.Name() @@ -310,7 +306,6 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange } else { result.FilesImported += 1 } - break case RawPhoto: x := de.Name() @@ -330,7 +325,6 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange } else { result.FilesImported += 1 } - break case PanoramaIndex: } diff --git a/pkg/gopro/connect.go b/pkg/gopro/connect.go index 315dd1d..4f64a3c 100644 --- a/pkg/gopro/connect.go +++ b/pkg/gopro/connect.go @@ -27,13 +27,15 @@ var gpTurbo = true func handleKill() { c := make(chan os.Signal) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) //nolint:govet // todo go func() { <-c color.Red("\nKilling program, exiting Turbo mode.") - if gpTurbo { - caller(ipAddress, "gp/gpTurbo?p=0", nil) - } + if gpTurbo { + if err := caller(ipAddress, "gp/gpTurbo?p=0", nil); err != nil { + color.Red("Could not exit turbo mode") + } + } os.Exit(0) }() } @@ -94,17 +96,17 @@ func getThumbnailFilename(filename string) string { return replacer.Replace(filename) } func ImportConnect(in, out string, sortOptions SortOptions) (*utils.Result, error) { - var verType GoProType = V2 + var verType GoProType = V2 var result utils.Result ipAddress = in handleKill() // activate turbo - var gpTurboOut = "" + var gpTurboOut = "" err := caller(in, "gp/gpTurbo?p=1", gpTurboOut) if err != nil { - gpTurbo = false - verType = V1 + gpTurbo = false + verType = V1 } var gpMediaList = &goProMediaList{} @@ -147,12 +149,12 @@ func ImportConnect(in, out string, sortOptions SortOptions) (*utils.Result, erro dayFolder := filepath.Join(out, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if sortOptions.ByCamera { if _, err := os.Stat(filepath.Join(dayFolder, cameraName)); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) } dayFolder = filepath.Join(dayFolder, cameraName) } @@ -263,8 +265,10 @@ func ImportConnect(in, out string, sortOptions SortOptions) (*utils.Result, erro } } } - if gpTurbo { - caller(ipAddress, "gp/gpTurbo?p=0", nil) - } + if gpTurbo { + if err := caller(ipAddress, "gp/gpTurbo?p=0", nil); err != nil { + color.Red("Could not exit turbo mode") + } + } return &result, nil } diff --git a/pkg/gopro/gopro.go b/pkg/gopro/gopro.go index 4f52b12..0b0ee66 100644 --- a/pkg/gopro/gopro.go +++ b/pkg/gopro/gopro.go @@ -176,6 +176,8 @@ var FileTypeMatches = map[GoProType][]FileTypeMatch{ }, } +var MediaFolderRegex = regexp.MustCompile(`\d\d\dGOPRO`) + var ffprobe = utils.NewFFprobe(nil) func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange []string, cameraOptions map[string]interface{}) (*utils.Result, error) { @@ -302,13 +304,11 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange result := importFromMAX(filepath.Join(in, fmt.Sprint(DCIM)), out, sortOptions) return &result, nil default: - return nil, errors.New(fmt.Sprintf("Camera `%s` is not supported", gpVersion.CameraType)) + return nil, fmt.Errorf("Camera `%s` is not supported", gpVersion.CameraType) } } func importFromMAX(root string, output string, sortoptions SortOptions) utils.Result { - mediaFolder := `\d\d\dGOPRO` - fileTypes := FileTypeMatches[MAX] var result utils.Result @@ -334,10 +334,8 @@ func importFromMAX(root string, output string, sortoptions SortOptions) utils.Re } for _, f := range folders { - r, err := regexp.MatchString(mediaFolder, f.Name()) - if err != nil { - result.Errors = append(result.Errors, err) - } + r := MediaFolderRegex.MatchString(f.Name()) + if r { color.Green("Looking at %s", f.Name()) @@ -375,12 +373,12 @@ func importFromMAX(root string, output string, sortoptions SortOptions) utils.Re dayFolder := filepath.Join(output, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if sortoptions.ByCamera { if _, err := os.Stat(filepath.Join(dayFolder, "MAX")); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, "MAX"), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, "MAX"), 0755) } dayFolder = filepath.Join(dayFolder, "MAX") } @@ -531,7 +529,6 @@ func importFromMAX(root string, output string, sortoptions SortOptions) utils.Re } func importFromGoProV2(root string, output string, sortoptions SortOptions, cameraName string) utils.Result { - mediaFolder := `\d\d\dGOPRO` fileTypes := FileTypeMatches[V2] var result utils.Result @@ -557,10 +554,8 @@ func importFromGoProV2(root string, output string, sortoptions SortOptions, came } for _, f := range folders { - r, err := regexp.MatchString(mediaFolder, f.Name()) - if err != nil { - result.Errors = append(result.Errors, err) - } + r := MediaFolderRegex.MatchString(f.Name()) + if r { color.Green("Looking at %s", f.Name()) @@ -598,12 +593,12 @@ func importFromGoProV2(root string, output string, sortoptions SortOptions, came dayFolder := filepath.Join(output, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if sortoptions.ByCamera { if _, err := os.Stat(filepath.Join(dayFolder, cameraName)); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) } dayFolder = filepath.Join(dayFolder, cameraName) } @@ -757,7 +752,6 @@ func importFromGoProV2(root string, output string, sortoptions SortOptions, came } func importFromGoProV1(root string, output string, sortoptions SortOptions, cameraName string) utils.Result { - mediaFolder := `\d\d\dGOPRO` fileTypes := FileTypeMatches[V1] var result utils.Result @@ -769,10 +763,8 @@ func importFromGoProV1(root string, output string, sortoptions SortOptions, came } for _, f := range folders { - r, err := regexp.MatchString(mediaFolder, f.Name()) - if err != nil { - result.Errors = append(result.Errors, err) - } + r := MediaFolderRegex.MatchString(f.Name()) + if r { color.Green("Looking at %s", f.Name()) @@ -810,12 +802,12 @@ func importFromGoProV1(root string, output string, sortoptions SortOptions, came dayFolder := filepath.Join(output, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if sortoptions.ByCamera { if _, err := os.Stat(filepath.Join(dayFolder, cameraName)); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, cameraName), 0755) } dayFolder = filepath.Join(dayFolder, cameraName) } diff --git a/pkg/gopro/structs.go b/pkg/gopro/structs.go index 7a3a835..34a7952 100644 --- a/pkg/gopro/structs.go +++ b/pkg/gopro/structs.go @@ -129,10 +129,6 @@ type goProMediaList struct { } `json:"media"` } -type goProTurboResponse struct { - Turbo string `json:"turbo"` -} - type GoProConnectDevice struct { IP string Info cameraInfo diff --git a/pkg/insta360/insta360.go b/pkg/insta360/insta360.go index 442cb63..9807ff7 100644 --- a/pkg/insta360/insta360.go +++ b/pkg/insta360/insta360.go @@ -43,7 +43,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange model := "" mediaFolder := `Camera\d+` - + mediaFolderRegex := regexp.MustCompile(mediaFolder) fileTypes := []FileTypeMatch{ { Regex: regexp.MustCompile(`IMG_\d+_\d+_\d\d_\d+.jpg`), @@ -120,10 +120,7 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange } for _, f := range folders { - r, err := regexp.MatchString(mediaFolder, f.Name()) - if err != nil { - result.Errors = append(result.Errors, err) - } + r := mediaFolderRegex.MatchString(f.Name()) if r { if model != "" { color.Green("Looking at %s", f.Name()) @@ -190,11 +187,11 @@ func Import(in, out, dateFormat string, bufferSize int, prefix string, dateRange dayFolder := filepath.Join(out, mediaDate) if _, err := os.Stat(dayFolder); os.IsNotExist(err) { - os.Mkdir(dayFolder, 0755) + _ = os.Mkdir(dayFolder, 0755) } if _, err := os.Stat(filepath.Join(dayFolder, "Insta360 Camera")); os.IsNotExist(err) { - os.Mkdir(filepath.Join(dayFolder, "Insta360 Camera"), 0755) + _ = os.Mkdir(filepath.Join(dayFolder, "Insta360 Camera"), 0755) } dayFolder = filepath.Join(dayFolder, "Insta360 Camera") diff --git a/pkg/utils/cameras.go b/pkg/utils/cameras.go index 21e2767..8a99ef3 100644 --- a/pkg/utils/cameras.go +++ b/pkg/utils/cameras.go @@ -10,7 +10,6 @@ import ( "os" "path/filepath" "strings" - "time" "github.com/cheggaaa/pb" "github.com/dustin/go-humanize" @@ -168,15 +167,6 @@ func CopyDir(src string, dst string, bufferSize int) (err error) { return nil } -type Timedelta struct { - Base time.Time - End time.Time -} - -func (t *Timedelta) diff() time.Time { - return t.Base.AddDate(t.End.Year(), int(t.End.Month()), t.End.Day()) -} - type WriteCounter struct { Total uint64 } @@ -253,7 +243,9 @@ func Unzip(src string, dest string) error { if f.FileInfo().IsDir() { // Make Folder - os.MkdirAll(fpath, os.ModePerm) + if err = os.MkdirAll(fpath, os.ModePerm); err != nil { + return err + } continue } diff --git a/pkg/video_manipulation/ffmpeg.go b/pkg/video_manipulation/ffmpeg.go index 1a73dc8..8913d38 100644 --- a/pkg/video_manipulation/ffmpeg.go +++ b/pkg/video_manipulation/ffmpeg.go @@ -19,6 +19,7 @@ func New() { trans.SetConfiguration(conf) } +//nolint:golint,unused,errcheck func extractGPMF(input string) (*[]byte, error) { err := trans.InitializeEmptyTranscoder()