mirror of
https://github.com/foomo/gocontentful.git
synced 2025-10-16 12:25:39 +00:00
chore: version bump and test API update
This commit is contained in:
parent
e16de9fc8d
commit
1671d0187a
2
main.go
2
main.go
@ -14,7 +14,7 @@ import (
|
||||
"github.com/foomo/gocontentful/erm"
|
||||
)
|
||||
|
||||
var VERSION = "v1.0.14"
|
||||
var VERSION = "v1.0.15"
|
||||
|
||||
type contentfulRc struct {
|
||||
ManagementToken string `json:"managementToken"`
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import (
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import "github.com/foomo/contentful"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import (
|
||||
@ -1308,37 +1308,41 @@ func (n *RichTextGenericNode) richTextRenderHTML(w io.Writer, linkResolver LinkR
|
||||
case RichTextNodeText:
|
||||
tags = []richTextHtmlTag{}
|
||||
case RichTextNodeHyperlink:
|
||||
uri := n.Data["uri"]
|
||||
attrs := map[string]string{}
|
||||
switch uriString := uri.(type) {
|
||||
case string:
|
||||
if uriString != "" {
|
||||
resolvedAttrs, errResolveAttrs := linkResolver(uriString)
|
||||
if errResolveAttrs != nil {
|
||||
err = errResolveAttrs
|
||||
return
|
||||
if n.Data != nil {
|
||||
uri := n.Data["uri"]
|
||||
attrs := map[string]string{}
|
||||
switch uriString := uri.(type) {
|
||||
case string:
|
||||
if uriString != "" {
|
||||
resolvedAttrs, errResolveAttrs := linkResolver(uriString)
|
||||
if errResolveAttrs != nil {
|
||||
err = errResolveAttrs
|
||||
return
|
||||
}
|
||||
attrs = resolvedAttrs
|
||||
}
|
||||
attrs = resolvedAttrs
|
||||
}
|
||||
tags = []richTextHtmlTag{richTextHtmlTag{name: HtmlAnchor, attrs: attrs}}
|
||||
}
|
||||
tags = []richTextHtmlTag{richTextHtmlTag{name: HtmlAnchor, attrs: attrs}}
|
||||
case RichTextNodeEntryHyperlink:
|
||||
target := n.Data["target"]
|
||||
attrs := map[string]string{}
|
||||
switch target.(type) {
|
||||
case map[string]interface{}:
|
||||
targetSys, ok := target.(map[string]interface{})["sys"]
|
||||
if ok {
|
||||
entryID := targetSys.(map[string]interface{})["id"].(string)
|
||||
resolvedAttrs, errResolveAttrs := entryLinkResolver(entryID, locale)
|
||||
if errResolveAttrs != nil {
|
||||
err = errResolveAttrs
|
||||
return
|
||||
if n.Data != nil {
|
||||
target := n.Data["target"]
|
||||
attrs := map[string]string{}
|
||||
switch target.(type) {
|
||||
case map[string]interface{}:
|
||||
targetSys, ok := target.(map[string]interface{})["sys"]
|
||||
if ok {
|
||||
entryID := targetSys.(map[string]interface{})["id"].(string)
|
||||
resolvedAttrs, errResolveAttrs := entryLinkResolver(entryID, locale)
|
||||
if errResolveAttrs != nil {
|
||||
err = errResolveAttrs
|
||||
return
|
||||
}
|
||||
attrs = resolvedAttrs
|
||||
}
|
||||
attrs = resolvedAttrs
|
||||
}
|
||||
tags = []richTextHtmlTag{richTextHtmlTag{name: HtmlAnchor, attrs: attrs}}
|
||||
}
|
||||
tags = []richTextHtmlTag{richTextHtmlTag{name: HtmlAnchor, attrs: attrs}}
|
||||
case RichTextNodeEmbeddedAsset:
|
||||
if imageResolver == nil {
|
||||
return errors.New("can't resolve image asset URL")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import (
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import (
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.14 - DO NOT EDIT.
|
||||
// Code generated by https://github.com/foomo/gocontentful v1.0.15 - DO NOT EDIT.
|
||||
package testapi
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user