Skip to content

Commit

Permalink
delete imagemagick path from every config
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Dec 8, 2023
1 parent 6e61063 commit cbcab23
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ type Config struct {
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
} `mapstructure:"accessLog" yaml:"accessLog"`

// ImageMagick ImageMagick実行ファイルパス
ImageMagick string `mapstructure:"imagemagick" yaml:"imagemagick"`

// Imaging 画像処理設定
Imaging struct {
// MaxPixels 処理可能な最大画素数 (default: 2560*1600)
Expand Down Expand Up @@ -263,7 +260,6 @@ func init() {
viper.SetDefault("gzip", true)
viper.SetDefault("allowSignUp", false)
viper.SetDefault("accessLog.enabled", true)
viper.SetDefault("imagemagick", "")
viper.SetDefault("imaging.maxPixels", 2560*1600)
viper.SetDefault("imaging.concurrency", 1)
viper.SetDefault("mariadb.host", "127.0.0.1")
Expand Down Expand Up @@ -470,7 +466,6 @@ func provideImageProcessorConfig(c *Config) imaging.Config {
MaxPixels: c.Imaging.MaxPixels,
Concurrency: c.Imaging.Concurrency,
ThumbnailMaxSize: image.Pt(360, 480),
ImageMagickPath: c.ImageMagick,
}
}

Expand Down
1 change: 0 additions & 1 deletion router/v1/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestMain(m *testing.M) {
MaxPixels: 1000 * 1000,
Concurrency: 1,
ThumbnailMaxSize: image.Pt(360, 480),
ImageMagickPath: "",
})
env.FileManager, _ = file.InitFileManager(env.Repository, storage.NewInMemoryFileStorage(), env.ImageProcessor, zap.NewNop())

Expand Down
1 change: 0 additions & 1 deletion router/v3/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ func TestMain(m *testing.M) {
MaxPixels: 1000 * 1000,
Concurrency: 1,
ThumbnailMaxSize: image.Pt(360, 480),
ImageMagickPath: "",
})
env.FM, _ = file.InitFileManager(repo, storage.NewInMemoryFileStorage(), env.IP, l.Named("FM"))

Expand Down
2 changes: 0 additions & 2 deletions service/imaging/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ type Config struct {
Concurrency int
// ThumbnailMaxSize サムネイル画像サイズ
ThumbnailMaxSize image.Point
// ImageMagickPath imagemagickの実行パス
ImageMagickPath string
}
1 change: 0 additions & 1 deletion service/imaging/processor_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func setup() (Processor, *os.File) {
MaxPixels: 500 * 500,
Concurrency: 1,
ThumbnailMaxSize: image.Point{50, 50},
ImageMagickPath: "",
})
return processor, mustOpen("test.png")
}
Expand Down

0 comments on commit cbcab23

Please sign in to comment.