Commit eeec06b7 authored by Somnath Ghorpade's avatar Somnath Ghorpade
Browse files

Resolved conflicts.

1 merge request!297Resolved conflicts.
Showing with 39 additions and 40 deletions
......@@ -54,7 +54,7 @@ func LogError(args ...interface{}) {
// LogPanic logs a message at level Panic on the standard logger.
func LogPanic(args ...interface{}) {
log.Panic(args)
log.Panic(args...)
}
// // LogJSONObject Format string
......
......@@ -4,7 +4,6 @@
package loggermdl
import (
"encoding/json"
"fmt"
"testing"
......@@ -46,56 +45,56 @@ func ExampleLogDebug() {
//Output:
//
}
func TestLogJSONString(t *testing.T) {
a := `{"Age": 1,"Name": "sometext"}`
// func TestLogJSONString(t *testing.T) {
// a := `{"Age": 1,"Name": "sometext"}`
assert.NotPanics(t, func() { LogJSONString(a) }, "The code did panic")
// assert.NotPanics(t, func() { LogJSONString(a) }, "The code did panic")
//Output2:
// {
// "Age": 1,
// "Name": "sometext"
// }
}
// //Output2:
// // {
// // "Age": 1,
// // "Name": "sometext"
// // }
// }
func ExampleLogHREnd() {
LogHREnd()
//Output:
//<<<<<<<<<<<<<<<<<<<<<<<
}
func TestLogJSONObject(t *testing.T) {
type MySt struct {
Name string
Age int
}
m := MySt{"sometext", 1}
// jsonUnmarshal(json.Marshal(m), &m)
assert.NotPanics(t, func() { LogJSONObject(m) }, "The code did panic")
//Output1:
//{
// "Age": 1,
// "Name": "sometext"
//}
}
// func TestLogJSONObject(t *testing.T) {
// type MySt struct {
// Name string
// Age int
// }
// m := MySt{"sometext", 1}
// // jsonUnmarshal(json.Marshal(m), &m)
// assert.NotPanics(t, func() { LogJSONObject(m) }, "The code did panic")
// //Output1:
// //{
// // "Age": 1,
// // "Name": "sometext"
// //}
// }
func TestLogJSONByte(t *testing.T) { // func ExampleLogJSONByte() {
// func TestLogJSONByte(t *testing.T) { // func ExampleLogJSONByte() {
type MySt struct {
Name string
Age int
}
m := MySt{"sometext", 1}
a, _ := json.Marshal(m)
// type MySt struct {
// Name string
// Age int
// }
// m := MySt{"sometext", 1}
// a, _ := json.Marshal(m)
assert.NotPanics(t, func() { LogJSONByte(a) }, "The code did panic")
//Output1:
// {
// "Age": 1,
// "Name": "sometext"
// }
// assert.NotPanics(t, func() { LogJSONByte(a) }, "The code did panic")
// //Output1:
// // {
// // "Age": 1,
// // "Name": "sometext"
// // }
}
// }
func ExampleLogHRStart() {
LogHRStart()
//Output:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment