Skip to content

Commit 7955ae5

Browse files
bitfieldNo-one-importantbhasdenvanjara
committed
Fix some test failures on Windows
Co-authored-by: Aaron Huntley <[email protected]> Co-authored-by: Brian Hasden <[email protected]> Co-authored-by: Umang Vanjara <[email protected]>
1 parent 91c46aa commit 7955ae5

29 files changed

+2425
-2332
lines changed

.circleci/config.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
version: 2
1+
version: 2.1
2+
orbs:
3+
windows: circleci/[email protected]
4+
25
jobs:
36
test:
47
docker:
58
- image: circleci/golang:1.17
69
steps:
710
- checkout
811
- run: go test ./...
12+
test-windows:
13+
executor:
14+
name: windows/default
15+
steps:
16+
- checkout
17+
- attach_workspace:
18+
at: script
19+
- run: go test
20+
921
workflows:
1022
version: 2
1123
test:
1224
jobs:
1325
- test
26+
- test-windows

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Treat all files in this repo as binary, with no git magic updating line
2+
# endings. Windows users contributing to the project will need to use a modern
3+
# version of git and editors capable of LF line endings.
4+
#
5+
# See https://github.com/golang/go/issues/9281
6+
* -text

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
examples/cat/cat
23
examples/grep/grep
34
examples/cat2/cat2

CONTRIBUTING.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ This is easy in Go. Just use `gofmt`. End of.
122122

123123
Your code should also pass `golint` and `go vet` without errors (and if you want to run other linters too, that would be excellent). Very, very occasionally there are situations where `golint` incorrectly detects a problem, and the workaround is awkward or annoying. In that situation, comment on the PR and we'll work out how best to handle it.
124124

125-
For ease of finding things, and to satisfy the tidy-minded, functions and methods are in alphabetical order within each file. Source functions are in `sources.go`, filter methods in `filters.go`, and sink methods in `sinks.go`. The `Pipe` type itself and its 'internal' methods (such as `SetError()`) are in `pipes.go`.
126-
127125
# Documentation
128126

129127
It doesn't matter if you write the greatest piece of code in the history of the world, if no one knows it exists, or how to use it.
@@ -146,7 +144,7 @@ This is the _whole_ user manual for your code. It will be included in the autoge
146144

147145
## Update the README
148146

149-
Any change to the `script` API should also be accompanied by an update to the README. If you add a new method, add it in the appropriate place (sources, filters, or sinks), in its correct order alphabetically, and with a suitable (brief) description.
147+
Any change to the `script` API should also be accompanied by an update to the README. If you add a new method, add it to the appropriate table (sources, filters, or sinks), and if it's the equivalent of a command Unix command, add it to the table of Unix equivalents too.
150148

151149
# Writing pipe operations
152150

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import "github.com/bitfield/script"
55
```
66

7-
[!['Excited gopher](img/magic.png)](https://bitfieldconsulting.com/golang/scripting)
7+
[![Magical gopher logo](img/magic.png)](https://bitfieldconsulting.com/golang/scripting)
88

99
# What is `script`?
1010

0 commit comments

Comments
 (0)