Documentation
¶
Index ¶
Constants ¶
View Source
const StructMemberString2LineRawTag = "string_line_2_raw"
Variables ¶
This section is empty.
Functions ¶
func String2LineRaw ¶
func StringInArr ¶
func StructMemberString2LineRaw ¶ added in v1.7.0
func StructMemberString2LineRaw(src interface{}) error
StructMemberString2LineRaw convert struct member string to line raw with tag string_tools.StructMemberString2LineRawTag just support as
type Foo struct { Name string `string_line_2_raw:"name"` Age int } type Bar struct { Foo Foo Name string `string_line_2_raw:"name"` Age int } bar := Bar{ Foo: Foo{ Name: "Foo\r\n", Age: 18, }, Name: "bob\r", } // change to by struct member tag err := string_tools.StructMemberString2LineRaw(&bar) if err != nil { t.Error(err) } // some with struct newBar := Bar{ Foo: Foo{ Name: `Foo\n`, Age: 18, }, Name: `bob\n`, }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.