Fix trimspace
This commit is contained in:
parent
1ceb67328f
commit
b1dd42b3ca
|
@ -23,6 +23,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
// "github.com/garyburd/redigo/redis"
|
// "github.com/garyburd/redigo/redis"
|
||||||
"github.com/pstuifzand/microsub-server/microsub"
|
"github.com/pstuifzand/microsub-server/microsub"
|
||||||
|
@ -101,7 +102,7 @@ func simplify(itemType string, item map[string][]interface{}) map[string]interfa
|
||||||
if content, e2 := feedItem["content"]; e2 {
|
if content, e2 := feedItem["content"]; e2 {
|
||||||
if contentMap, ok := content.(map[string]interface{}); ok {
|
if contentMap, ok := content.(map[string]interface{}); ok {
|
||||||
if text, e3 := contentMap["text"]; e3 {
|
if text, e3 := contentMap["text"]; e3 {
|
||||||
if strings.TrimSpace(name) == strings.TrimSpace(text) {
|
if strings.TrimSpace(name.(string)) == strings.TrimSpace(text.(string)) {
|
||||||
delete(feedItem, "name")
|
delete(feedItem, "name")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user