Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: pacoorozco <paco@pacoorozco.info>
  • Loading branch information
pacoorozco committed Oct 16, 2024
1 parent 8044f74 commit f85086a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
17 changes: 0 additions & 17 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@ func (c Config) ensureSourceFolderAbsolutePaths() error {
return nil
}

func isValidAlbumGenerationMethod(method string) bool {
if method != "folderPath" && method != "folderName" {
return false
}
return true
}

// ValidateAlbumOption checks if the value is a valid Album option.
func validateAlbumOption(value string, logger log.Logger) error {
if value == "" {
Expand Down Expand Up @@ -248,16 +241,6 @@ func validateTemplateOption(after string) error {
return nil
}

// isValidCreateAlbums checks if the value is a valid CreateAlbums option.
func isValidCreateAlbums(value string) bool {
switch value {
case "Off", "folderPath", "folderName":
return true
default:
}
return false
}

// unmarshalReader unmarshal HJSON data into the provided interface.
func unmarshalReader(in io.Reader, c interface{}) error {
buf := new(bytes.Buffer)
Expand Down
10 changes: 0 additions & 10 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package config_test

import (
"fmt"
"github.com/gphotosuploader/gphotos-uploader-cli/internal/log"
"path/filepath"
"testing"
Expand Down Expand Up @@ -103,15 +102,6 @@ func TestFromFile(t *testing.T) {
}
}

type mockLogger struct {
log.Logger
messages []string
}

func (m *mockLogger) Warnf(format string, args ...interface{}) {
m.messages = append(m.messages, fmt.Sprintf(format, args...))
}

func TestConfig_SafePrint(t *testing.T) {
cfg := config.Config{
APIAppCredentials: config.APIAppCredentials{
Expand Down

0 comments on commit f85086a

Please sign in to comment.