Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "os" "github.com/Konstantin8105/compare" ) type checker struct { iserror bool err error } func (c *checker) Errorf(format string, args ...any) { c.iserror = true c.err = fmt.Errorf(format, args...) } func main() { var c checker wrong := []byte("bad\n") compare.Test(&c, ".test", wrong) if !c.iserror { panic("check wrong body") } fmt.Fprintf(os.Stdout, "%v", c.err) }
Output: * 1 "good" "bad" * 2 "good" "" * 3 "good" << EMPTY LINE>> * 4 "good" << EMPTY LINE>> and more other ... meld ".test" ".test.new" &
Index ¶
Examples ¶
Constants ¶
View Source
const ( Key = "UPDATE" KeyValid = "true" )
Basic values
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
Diff will print two strings vertically next to each other so that line differences are easier to read.
Types ¶
Click to show internal directories.
Click to hide internal directories.