server, examples, extensions lint compliant (#1109)

these are all automated changes suggested by golint
This commit is contained in:
Reed Allman
2018-07-04 09:23:15 -05:00
committed by Owen Cliffe
parent 6f5e58144a
commit 1cdb47d6e9
30 changed files with 355 additions and 223 deletions

View File

@@ -16,10 +16,10 @@ import (
// note: for backward compatibility, will go away later
type callLogResponse struct {
Message string `json:"message"`
Log *CallLog `json:"log"`
Log *callLog `json:"log"`
}
type CallLog struct {
type callLog struct {
CallID string `json:"call_id" db:"id"`
Log string `json:"log" db:"log"`
}
@@ -28,7 +28,7 @@ func writeJSON(c *gin.Context, callID string, logReader io.Reader) {
var b bytes.Buffer
b.ReadFrom(logReader)
c.JSON(http.StatusOK, callLogResponse{"Successfully loaded log",
&CallLog{
&callLog{
CallID: callID,
Log: b.String(),
}})