diff --git a/example/basic/main.go b/example/basic/main.go index 3a5724e..46af432 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -1,9 +1,10 @@ package main import ( - "../../" "fmt" "log" + + "github.com/koyachi/go-nude" ) func main() { diff --git a/example/fillskinpixels/main.go b/example/fillskinpixels/main.go index afe7cea..9a50d78 100644 --- a/example/fillskinpixels/main.go +++ b/example/fillskinpixels/main.go @@ -1,7 +1,6 @@ package main import ( - "../../" "fmt" "image" "image/color" @@ -10,6 +9,8 @@ import ( "log" "os" "path/filepath" + + "github.com/koyachi/go-nude" ) func fillSkinPixels(imagePath string, regions nude.Regions) { diff --git a/example/region/main.go b/example/region/main.go index 1de6018..62b27e4 100644 --- a/example/region/main.go +++ b/example/region/main.go @@ -1,7 +1,6 @@ package main import ( - "../../" "fmt" "image" "image/color" @@ -10,6 +9,8 @@ import ( "log" "os" "path/filepath" + + "github.com/koyachi/go-nude" ) func drawImageAndRegions(imagePath string, regions nude.Regions) { diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..161978f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/koyachi/go-nude + +go 1.20 diff --git a/nude.go b/nude.go index 24b525c..d5137fd 100644 --- a/nude.go +++ b/nude.go @@ -27,7 +27,7 @@ func IsFileNude(imageFilePath string) (bool, error) { } func IsImageNude(img image.Image) (bool, error) { - d:= NewDetector(img) + d := NewDetector(img) return d.Parse() } @@ -47,7 +47,7 @@ type Detector struct { } func NewDetector(img image.Image) *Detector { - d := &Detector{image: img } + d := &Detector{image: img} return d }