123456789101112131415161718192021222324252627282930313233 |
- package xvdoc
- import (
- "encoding/json"
- "fmt"
- )
- func constructorString(dec *json.Decoder, t json.Token) (res Cell, err error) {
- if str, check := t.(string); check {
- res = &CellString{str}
- }
- return
- }
- type CellString struct {
- val string
- }
- func (s *CellString) Val() interface{} {
- return s.val
- }
- func (s *CellString) Type() string {
- return "string"
- }
- func (s *CellString) String() string {
- return fmt.Sprintf("{ string: %v }", s.val)
- }
- func (s *CellString) Styles() []string {
- return nil
- }
|