summaryrefslogtreecommitdiff
path: root/stream_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-01-05 00:13:29 +0800
committerxuri <xuri.me@gmail.com>2022-01-05 00:13:29 +0800
commit9e64df6a96685afcfbc7295beda38739868a6871 (patch)
tree091e643fe90da2e6bf5eb5a198ca8a8ca59c2ce2 /stream_test.go
parente37e060d6f97274c1e967cea40609623493bce25 (diff)
Update create style example, using a pointer of the structure instead of JSON
Diffstat (limited to 'stream_test.go')
-rw-r--r--stream_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream_test.go b/stream_test.go
index dd1be8a..7a93380 100644
--- a/stream_test.go
+++ b/stream_test.go
@@ -53,7 +53,7 @@ func TestStreamWriter(t *testing.T) {
assert.NoError(t, streamWriter.SetRow("A3", row))
// Test set cell with style.
- styleID, err := file.NewStyle(`{"font":{"color":"#777777"}}`)
+ styleID, err := file.NewStyle(&Style{Font: &Font{Color: "#777777"}})
assert.NoError(t, err)
assert.NoError(t, streamWriter.SetRow("A4", []interface{}{Cell{StyleID: styleID}, Cell{Formula: "SUM(A10,B10)"}}), RowOpts{Height: 45, StyleID: styleID})
assert.NoError(t, streamWriter.SetRow("A5", []interface{}{&Cell{StyleID: styleID, Value: "cell"}, &Cell{Formula: "SUM(A10,B10)"}}))