Code clean-up (go fmt)

This commit is contained in:
Michael Mayer 2018-09-17 18:40:57 +02:00
parent 0c1f326dc5
commit da77a1230e
6 changed files with 8 additions and 9 deletions

View file

@ -22,7 +22,7 @@ func NewCamera(modelName string) *Camera {
result := &Camera{
CameraModel: modelName,
CameraSlug: cameraSlug,
CameraSlug: cameraSlug,
}
return result

View file

@ -19,4 +19,4 @@ type Location struct {
LocCountry string
LocCountryCode string
LocFavorite bool
}
}

View file

@ -64,4 +64,4 @@ func TestSearch_Photos_Camera(t *testing.T) {
t.Log(photos)
t.Logf("Total Count: %d", total)
}
}

View file

@ -13,12 +13,12 @@ import (
type TensorFlow struct {
modelPath string
graph *tf.Graph
labels []string
graph *tf.Graph
labels []string
}
func NewTensorFlow(tensorFlowModelPath string) *TensorFlow {
return &TensorFlow{modelPath:tensorFlowModelPath}
return &TensorFlow{modelPath: tensorFlowModelPath}
}
type TensorFlowLabel struct {
@ -130,7 +130,6 @@ func (t *TensorFlow) findBestLabels(probabilities []float32) []TensorFlowLabel {
return resultLabels[:5]
}
func (t *TensorFlow) makeTensorFromImage(image string, imageFormat string) (*tf.Tensor, error) {
tensor, err := tf.NewTensor(image)
if err != nil {

View file

@ -3,8 +3,8 @@ package server
import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/photoprism/photoprism/internal/photoprism"
"github.com/photoprism/photoprism/internal/forms"
"github.com/photoprism/photoprism/internal/photoprism"
"net/http"
"strconv"
)

View file

@ -9,7 +9,7 @@ import (
func Start(conf *photoprism.Config) {
if conf.ServerMode != "" {
gin.SetMode(conf.ServerMode)
} else if conf.Debug == false{
} else if conf.Debug == false {
gin.SetMode(gin.ReleaseMode)
}