A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cloudevents/sdk-go/commit/41e80f74b16532322a1f38cb4df7424c4c6bbc99 below:

fixed couple issues · cloudevents/sdk-go@41e80f7 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+7

-7

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+7

-7

lines changed Original file line number Diff line number Diff line change

@@ -91,7 +91,7 @@ func ToProto(e *event.Event) (*pb.CloudEvent, error) {

91 91

dataSchemaStr := e.DataSchema()

92 92

uri, err := url.Parse(dataSchemaStr)

93 93

if err != nil {

94 -

return nil, fmt.Errorf("failed to url.Parse %s: %s", dataSchemaStr, err)

94 +

return nil, fmt.Errorf("failed to url.Parse %s: %w", dataSchemaStr, err)

95 95

}

96 96

container.Attributes[dataschema], _ = attributeFor(uri)

97 97

}

Original file line number Diff line number Diff line change

@@ -109,7 +109,7 @@ func TestFromProto(t *testing.T) {

109 109

Type: "some.type",

110 110

Attributes: map[string]*pb.CloudEventAttributeValue{

111 111

"datacontenttype": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "application/json"}},

112 -

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "link"}},

112 +

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "https://example-data-schema.com"}},

113 113

"extra1": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "extra1 value"}},

114 114

"extra2": {Attr: &pb.CloudEventAttributeValue_CeInteger{CeInteger: 2}},

115 115

"extra3": {Attr: &pb.CloudEventAttributeValue_CeBoolean{CeBoolean: true}},

@@ -125,7 +125,7 @@ func TestFromProto(t *testing.T) {

125 125

out.SetSource("/source")

126 126

out.SetType("some.type")

127 127

_ = out.SetData("application/json", map[string]interface{}{"unit": "test"})

128 -

out.SetDataSchema("link")

128 +

out.SetDataSchema("https://example-data-schema.com")

129 129

out.SetExtension("extra1", "extra1 value")

130 130

out.SetExtension("extra2", 2)

131 131

out.SetExtension("extra3", true)

@@ -142,7 +142,7 @@ func TestFromProto(t *testing.T) {

142 142

Type: "some.type",

143 143

Attributes: map[string]*pb.CloudEventAttributeValue{

144 144

"datacontenttype": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "text/plain"}},

145 -

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "link"}},

145 +

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "https://example-data-schema.com"}},

146 146

"extra1": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "extra1 value"}},

147 147

"extra2": {Attr: &pb.CloudEventAttributeValue_CeInteger{CeInteger: 2}},

148 148

"extra3": {Attr: &pb.CloudEventAttributeValue_CeBoolean{CeBoolean: true}},

@@ -158,7 +158,7 @@ func TestFromProto(t *testing.T) {

158 158

out.SetSource("/source")

159 159

out.SetType("some.type")

160 160

_ = out.SetData("text/plain", `this is some text with a "quote"`)

161 -

out.SetDataSchema("link")

161 +

out.SetDataSchema("https://example-data-schema.com")

162 162

out.SetExtension("extra1", "extra1 value")

163 163

out.SetExtension("extra2", 2)

164 164

out.SetExtension("extra3", true)

@@ -175,7 +175,7 @@ func TestFromProto(t *testing.T) {

175 175

Type: "some.type",

176 176

Attributes: map[string]*pb.CloudEventAttributeValue{

177 177

"datacontenttype": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "application/json"}},

178 -

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "link"}},

178 +

"dataschema": {Attr: &pb.CloudEventAttributeValue_CeUri{CeUri: "https://example-data-schema.com"}},

179 179

"extra1": {Attr: &pb.CloudEventAttributeValue_CeString{CeString: "extra1 value"}},

180 180

"extra2": {Attr: &pb.CloudEventAttributeValue_CeInteger{CeInteger: 2}},

181 181

"extra3": {Attr: &pb.CloudEventAttributeValue_CeBoolean{CeBoolean: true}},

@@ -191,7 +191,7 @@ func TestFromProto(t *testing.T) {

191 191

out.SetSource("/source")

192 192

out.SetType("some.type")

193 193

_ = out.SetData("application/json", `{"unit":"test"}`)

194 -

out.SetDataSchema("link")

194 +

out.SetDataSchema("https://example-data-schema.com")

195 195

out.SetExtension("extra1", "extra1 value")

196 196

out.SetExtension("extra2", 2)

197 197

out.SetExtension("extra3", true)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4