github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/types/jsonlines/enclosure.go (about)

     1  package jsonlines
     2  
     3  import "bytes"
     4  
     5  func noQuote(slice []byte) bool {
     6  	return !bytes.HasPrefix(slice, []byte{'"'}) || !bytes.HasSuffix(slice, []byte{'"'})
     7  }
     8  
     9  func noSquare(slice []byte) bool {
    10  	return !bytes.HasPrefix(slice, []byte{'['}) || !bytes.HasSuffix(slice, []byte{']'})
    11  }
    12  
    13  func noCurly(slice []byte) bool {
    14  	return !bytes.HasPrefix(slice, []byte{'{'}) || !bytes.HasSuffix(slice, []byte{'}'})
    15  }