From ca5070ed8bbbf7084eea248a09b38ddf5552d9c6 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Tue, 12 Oct 2021 18:54:37 +0200 Subject: [PATCH] refactor: mv camera package to pkg dir --- cmd/rc-camera/rc-camera.go | 2 +- {camera => pkg/camera}/camera.go | 6 +++--- {camera => pkg/camera}/camera_test.go | 0 {camera => pkg/camera}/testdata/img.jpg | Bin 4 files changed, 4 insertions(+), 4 deletions(-) rename {camera => pkg/camera}/camera.go (96%) rename {camera => pkg/camera}/camera_test.go (100%) rename {camera => pkg/camera}/testdata/img.jpg (100%) diff --git a/cmd/rc-camera/rc-camera.go b/cmd/rc-camera/rc-camera.go index ee30e3f..c045a6a 100644 --- a/cmd/rc-camera/rc-camera.go +++ b/cmd/rc-camera/rc-camera.go @@ -3,7 +3,7 @@ package main import ( "flag" "github.com/cyrilix/robocar-base/cli" - "github.com/cyrilix/robocar-camera/camera" + "github.com/cyrilix/robocar-camera/pkg/camera" "go.uber.org/zap" "gocv.io/x/gocv" "log" diff --git a/camera/camera.go b/pkg/camera/camera.go similarity index 96% rename from camera/camera.go rename to pkg/camera/camera.go index 777f182..54b6188 100644 --- a/camera/camera.go +++ b/pkg/camera/camera.go @@ -19,9 +19,9 @@ type VideoSource interface { } type OpencvCameraPart struct { - client mqtt.Client - vc VideoSource - topic string + client mqtt.Client + vc VideoSource + topic string publishFrequency int muImgBuffered sync.Mutex imgBuffered *gocv.Mat diff --git a/camera/camera_test.go b/pkg/camera/camera_test.go similarity index 100% rename from camera/camera_test.go rename to pkg/camera/camera_test.go diff --git a/camera/testdata/img.jpg b/pkg/camera/testdata/img.jpg similarity index 100% rename from camera/testdata/img.jpg rename to pkg/camera/testdata/img.jpg