mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
parent
b4ff26a7d0
commit
41649bf4f9
6 changed files with 14 additions and 14 deletions
|
|
@ -6,12 +6,15 @@ import (
|
|||
"github.com/johnkerl/miller/v6/pkg/colorizer"
|
||||
)
|
||||
|
||||
const boldString = "\u001b[1m"
|
||||
const underlineString = "\u001b[4m"
|
||||
const reversedString = "\u001b[7m"
|
||||
const redString = "\u001b[1;31m"
|
||||
const blueString = "\u001b[1;34m"
|
||||
const defaultString = "\u001b[0m"
|
||||
const (
|
||||
boldString = "\u001b[1m"
|
||||
reversedString = "\u001b[7m"
|
||||
redString = "\u001b[1;31m"
|
||||
blueString = "\u001b[1;34m"
|
||||
defaultString = "\u001b[0m"
|
||||
|
||||
// underlineString = "\u001b[4m"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Hello, world!\n")
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ func _zero1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
|
|||
}
|
||||
|
||||
// Return one (unary)
|
||||
//
|
||||
//lint:ignore U1000 util function might be used later
|
||||
func __one1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
|
||||
return mlrval.FromInt(1)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ func (node *DumpStatementNode) dumpToStderr(
|
|||
outputString string,
|
||||
state *runtime.State,
|
||||
) error {
|
||||
fmt.Fprintf(os.Stderr, outputString)
|
||||
fmt.Fprint(os.Stderr, outputString)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ func (root *RootNode) BuildStatementNode(
|
|||
|
||||
default:
|
||||
return nil, fmt.Errorf("at CST BuildStatementNode: unhandled AST node %s", string(astNode.Type))
|
||||
break
|
||||
}
|
||||
return statement, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,9 +104,7 @@ func processInPlace(
|
|||
|
||||
// Save off the file names from the command line.
|
||||
fileNames := make([]string, len(originalOptions.FileNames))
|
||||
for i, fileName := range originalOptions.FileNames {
|
||||
fileNames[i] = fileName
|
||||
}
|
||||
copy(fileNames, originalOptions.FileNames)
|
||||
|
||||
for _, fileName := range fileNames {
|
||||
|
||||
|
|
|
|||
|
|
@ -281,9 +281,7 @@ func (bsr *JSONCommentEnabledReader) Read(p []byte) (n int, err error) {
|
|||
func (bsr *JSONCommentEnabledReader) populateFromLine(p []byte) int {
|
||||
numBytesWritten := 0
|
||||
if len(bsr.lineBytes) < len(p) {
|
||||
for i := 0; i < len(bsr.lineBytes); i++ {
|
||||
p[i] = bsr.lineBytes[i]
|
||||
}
|
||||
copy(p, bsr.lineBytes)
|
||||
numBytesWritten = len(bsr.lineBytes)
|
||||
bsr.lineBytes = nil
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue