Skip to content
Snippets Groups Projects
Verified Commit affbe8db authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat: print support exitcode #17

parent abd140ed
No related branches found
No related tags found
No related merge requests found
Showing
with 339 additions and 302 deletions
//go:build windows
// +build windows
package flags
......
......@@ -46,11 +46,13 @@ bit conditions will yield a different hash from `sha1cd`, when compared
with results using `crypto/sha1`. Valid inputs will have matching the outputs.
## References
- https://shattered.io/
- https://github.com/cr-marcstevens/sha1collisiondetection
- https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#shavs
## Use of the Original Implementation
- https://github.com/git/git/commit/28dc98e343ca4eb370a29ceec4c19beac9b5c01e
- https://github.com/libgit2/libgit2/pull/4136
......
......@@ -3,7 +3,6 @@
[![build status](https://img.shields.io/github/actions/workflow/status/skeema/knownhosts/tests.yml?branch=main)](https://github.com/skeema/knownhosts/actions)
[![godoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/skeema/knownhosts)
> This repo is brought to you by [Skeema](https://github.com/skeema/skeema), a
> declarative pure-SQL schema management system for MySQL and MariaDB. Our
> premium products include extensive [SSH tunnel](https://www.skeema.io/docs/options/#ssh)
......@@ -15,11 +14,11 @@ However, that package is somewhat low-level, making it difficult to implement fu
This repo ([github.com/skeema/knownhosts](https://github.com/skeema/knownhosts)) is a thin wrapper package around [golang.org/x/crypto/ssh/knownhosts](https://pkg.go.dev/golang.org/x/crypto/ssh/knownhosts), adding the following functionality:
* Look up known_hosts public keys for any given host
* Auto-populate ssh.ClientConfig.HostKeyAlgorithms easily based on known_hosts, providing a solution for [golang/go#29286](https://github.com/golang/go/issues/29286)
* Write new known_hosts entries to an io.Writer
* Properly format/normalize new known_hosts entries containing ipv6 addresses, providing a solution for [golang/go#53463](https://github.com/golang/go/issues/53463)
* Determine if an ssh.HostKeyCallback's error corresponds to a host whose key has changed (indicating potential MitM attack) vs a host that just isn't known yet
- Look up known_hosts public keys for any given host
- Auto-populate ssh.ClientConfig.HostKeyAlgorithms easily based on known_hosts, providing a solution for [golang/go#29286](https://github.com/golang/go/issues/29286)
- Write new known_hosts entries to an io.Writer
- Properly format/normalize new known_hosts entries containing ipv6 addresses, providing a solution for [golang/go#53463](https://github.com/golang/go/issues/53463)
- Determine if an ssh.HostKeyCallback's error corresponds to a host whose key has changed (indicating potential MitM attack) vs a host that just isn't known yet
## How host key lookup works
......@@ -29,7 +28,7 @@ By using this technique, [github.com/skeema/knownhosts](https://github.com/skeem
## Populating ssh.ClientConfig.HostKeyAlgorithms based on known_hosts
Hosts often have multiple public keys, each of a different type (algorithm). This can be [problematic](https://github.com/golang/go/issues/29286) in [golang.org/x/crypto/ssh/knownhosts](https://pkg.go.dev/golang.org/x/crypto/ssh/knownhosts): if a host's first public key is *not* in known_hosts, but a key of a different type *is*, the HostKeyCallback returns an error. The solution is to populate `ssh.ClientConfig.HostKeyAlgorithms` based on the algorithms of the known_hosts entries for that host, but
Hosts often have multiple public keys, each of a different type (algorithm). This can be [problematic](https://github.com/golang/go/issues/29286) in [golang.org/x/crypto/ssh/knownhosts](https://pkg.go.dev/golang.org/x/crypto/ssh/knownhosts): if a host's first public key is _not_ in known_hosts, but a key of a different type _is_, the HostKeyCallback returns an error. The solution is to populate `ssh.ClientConfig.HostKeyAlgorithms` based on the algorithms of the known_hosts entries for that host, but
[golang.org/x/crypto/ssh/knownhosts](https://pkg.go.dev/golang.org/x/crypto/ssh/knownhosts)
does not provide an obvious way to do so.
......
......@@ -20,8 +20,7 @@ This README is a quick overview of how to use GJSON, for more information check
GJSON is also available for [Python](https://github.com/volans-/gjson-py) and [Rust](https://github.com/tidwall/gjson.rs)
Getting Started
===============
# Getting Started
## Installing
......@@ -34,6 +33,7 @@ $ go get -u github.com/tidwall/gjson
This will retrieve the library.
## Get a value
Get searches json for the specified path. A path is in dot syntax, such as "name.last" or "age". When the value is found it's returned immediately.
```go
......@@ -54,7 +54,8 @@ This will print:
```
Prichard
```
*There's also the [GetMany](#get-multiple-values-at-once) function to get multiple values at once, and [GetBytes](#working-with-bytes) for working with JSON byte slices.*
_There's also the [GetMany](#get-multiple-values-at-once) function to get multiple values at once, and [GetBytes](#working-with-bytes) for working with JSON byte slices._
## Path Syntax
......@@ -74,12 +75,18 @@ The dot and wildcard characters can be escaped with '\\'.
"children": ["Sara", "Alex", "Jack"],
"fav.movie": "Deer Hunter",
"friends": [
{"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},
{
"first": "Dale",
"last": "Murphy",
"age": 44,
"nets": ["ig", "fb", "tw"]
},
{ "first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"] },
{ "first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"] }
]
}
```
```
"name.last" >> "Anderson"
"age" >> 37
......@@ -107,10 +114,10 @@ friends.#(first!%"D*").last >> "Craig"
friends.#(nets.#(=="fb"))#.first >> ["Dale","Roger"]
```
*Please note that prior to v1.3.0, queries used the `#[...]` brackets. This was
_Please note that prior to v1.3.0, queries used the `#[...]` brackets. This was
changed in v1.3.0 as to avoid confusion with the new
[multipath](SYNTAX.md#multipaths) syntax. For backwards compatibility,
`#[...]` will continue to work until the next major release.*
`#[...]` will continue to work until the next major release._
## Result Type
......@@ -240,8 +247,8 @@ Which makes the json pretty and orders all of its keys.
}
```
*The full list of `@pretty` options are `sortKeys`, `indent`, `prefix`, and `width`.
Please see [Pretty Options](https://github.com/tidwall/pretty#customized-output) for more information.*
_The full list of `@pretty` options are `sortKeys`, `indent`, `prefix`, and `width`.
Please see [Pretty Options](https://github.com/tidwall/pretty#customized-output) for more information._
### Custom modifiers
......@@ -306,13 +313,15 @@ Suppose you want all the last names from the following json:
"programmers": [
{
"firstName": "Janet",
"lastName": "McLaughlin",
}, {
"lastName": "McLaughlin"
},
{
"firstName": "Elliotte",
"lastName": "Hunter",
}, {
"lastName": "Hunter"
},
{
"firstName": "Jason",
"lastName": "Harold",
"lastName": "Harold"
}
]
}
......@@ -485,4 +494,4 @@ widget.image.hOffset
widget.text.onMouseUp
```
*These benchmarks were run on a MacBook Pro 16" 2.4 GHz Intel Core i9 using Go 1.17 and can be found [here](https://github.com/tidwall/gjson-benchmarks).*
_These benchmarks were run on a MacBook Pro 16" 2.4 GHz Intel Core i9 using Go 1.17 and can be found [here](https://github.com/tidwall/gjson-benchmarks)._
......@@ -35,7 +35,12 @@ Given this JSON
"children": ["Sara", "Alex", "Jack"],
"fav.movie": "Deer Hunter",
"friends": [
{"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},
{
"first": "Dale",
"last": "Murphy",
"age": 44,
"nets": ["ig", "fb", "tw"]
},
{ "first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"] },
{ "first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"] }
]
......@@ -91,7 +96,6 @@ let val = gjson::get(json, "fav\\.movie") // must escape the slash
let val = gjson::get(json, r#"fav\.movie"#) // no need to escape the slash
```
### Arrays
The `#` character allows for digging into JSON Arrays.
......@@ -130,10 +134,10 @@ Nested queries are allowed.
friends.#(nets.#(=="fb"))#.first >> ["Dale","Roger"]
```
*Please note that prior to v1.3.0, queries used the `#[...]` brackets. This was
_Please note that prior to v1.3.0, queries used the `#[...]` brackets. This was
changed in v1.3.0 as to avoid confusion with the new [multipath](#multipaths)
syntax. For backwards compatibility, `#[...]` will continue to work until the
next major release.*
next major release._
The `~` (tilde) operator will convert a value to a boolean before comparison.
......@@ -212,16 +216,19 @@ Let's break down a few of these.
The path `friends.#(last="Murphy")#` all by itself results in
```json
[{"first": "Dale", "last": "Murphy", "age": 44},{"first": "Jane", "last": "Murphy", "age": 47}]
[
{ "first": "Dale", "last": "Murphy", "age": 44 },
{ "first": "Jane", "last": "Murphy", "age": 47 }
]
```
The `.first` suffix will process the `first` path on each array element *before* returning the results. Which becomes
The `.first` suffix will process the `first` path on each array element _before_ returning the results. Which becomes
```json
["Dale", "Jane"]
```
But the `|first` suffix actually processes the `first` path *after* the previous result.
But the `|first` suffix actually processes the `first` path _after_ the previous result.
Since the previous result is an array, not an object, it's not possible to process
because `first` does not exist.
......@@ -286,8 +293,8 @@ Which makes the json pretty and orders all of its keys.
}
```
*The full list of `@pretty` options are `sortKeys`, `indent`, `prefix`, and `width`.
Please see [Pretty Options](https://github.com/tidwall/pretty#customized-output) for more information.*
_The full list of `@pretty` options are `sortKeys`, `indent`, `prefix`, and `width`.
Please see [Pretty Options](https://github.com/tidwall/pretty#customized-output) for more information._
#### Custom modifiers
......@@ -309,7 +316,7 @@ gjson.AddModifier("case", func(json, arg string) string {
"children.@case:lower.@reverse" ["jack","alex","sara"]
```
*Note: Custom modifiers are not yet available in the Rust version*
_Note: Custom modifiers are not yet available in the Rust version_
### Multipaths
......@@ -327,9 +334,9 @@ Here we selected the first name, age, and the first name for friends with the
last name "Murphy".
You'll notice that an optional key can be provided, in this case
"the_murphys", to force assign a key to a value. Otherwise, the name of the
"the*murphys", to force assign a key to a value. Otherwise, the name of the
actual field will be used, in this case "first". If a name cannot be
determined, then "_" is used.
determined, then "*" is used.
This results in
......@@ -357,4 +364,4 @@ This results in
{ "first": "Tom", "age": 37, "company": "Happysoft", "employed": true }
```
*See issue [#249](https://github.com/tidwall/gjson/issues/249) for additional context on JSON Literals.*
_See issue [#249](https://github.com/tidwall/gjson/issues/249) for additional context on JSON Literals._
......@@ -2,7 +2,7 @@
[![GoDoc](https://godoc.org/github.com/tidwall/match?status.svg)](https://godoc.org/github.com/tidwall/match)
Match is a very simple pattern matcher where '*' matches on any
Match is a very simple pattern matcher where '\*' matches on any
number characters and '?' matches on any one character.
## Installing
......@@ -19,7 +19,6 @@ match.Match("jello", "?ello")
match.Match("hello", "h*o")
```
## Contact
Josh Baker [@tidwall](http://twitter.com/tidwall)
......
......@@ -10,13 +10,15 @@ import (
// and '?' matches on any one character.
//
// pattern:
//
// { term }
//
// term:
//
// '*' matches any sequence of non-Separator characters
// '?' matches any single non-Separator character
// c matches character c (c != '*', '?', '\\')
// '\\' c matches character c
//
func Match(str, pattern string) bool {
if pattern == "*" {
return true
......
......@@ -4,8 +4,7 @@
Pretty is a Go package that provides [fast](#performance) methods for formatting JSON for human readability, or to compact JSON for smaller payloads.
Getting Started
===============
# Getting Started
## Installing
......@@ -22,14 +21,17 @@ This will retrieve the library.
Using this example:
```json
{"name": {"first":"Tom","last":"Anderson"}, "age":37,
{
"name": { "first": "Tom", "last": "Anderson" },
"age": 37,
"children": ["Sara", "Alex", "Jack"],
"fav.movie": "Deer Hunter", "friends": [
{"first": "Janet", "last": "Murphy", "age": 44}
]}
"fav.movie": "Deer Hunter",
"friends": [{ "first": "Janet", "last": "Murphy", "age": 44 }]
}
```
The following code:
```go
result = pretty.Pretty(example)
```
......@@ -69,15 +71,16 @@ The second param is used for a customizing the style, and passing nil will use t
## Ugly
The following code:
```go
result = pretty.Ugly(example)
```
Will format the json to:
```json
````json
{"name":{"first":"Tom","last":"Anderson"},"age":37,"children":["Sara","Alex","Jack"],"fav.movie":"Deer Hunter","friends":[{"first":"Janet","last":"Murphy","age":44}]}```
```
````
## Customized output
......@@ -99,9 +102,11 @@ type Options struct {
SortKeys bool
}
```
## Performance
Benchmarks of Pretty alongside the builtin `encoding/json` Indent/Compact methods.
```
BenchmarkPretty-16 1000000 1034 ns/op 720 B/op 2 allocs/op
BenchmarkPrettySortKeys-16 586797 1983 ns/op 2848 B/op 14 allocs/op
......@@ -111,12 +116,12 @@ BenchmarkJSONIndent-16 450654 2687 ns/op 1221 B/op 0 allocs/op
BenchmarkJSONCompact-16 685111 1699 ns/op 442 B/op 0 allocs/op
```
*These benchmarks were run on a MacBook Pro 2.4 GHz 8-Core Intel Core i9.*
_These benchmarks were run on a MacBook Pro 2.4 GHz 8-Core Intel Core i9._
## Contact
Josh Baker [@tidwall](http://twitter.com/tidwall)
## License
Pretty source code is available under the MIT [License](/LICENSE).
......@@ -13,11 +13,9 @@ For quickly retrieving json values check out [GJSON](https://github.com/tidwall/
For a command line interface check out [JJ](https://github.com/tidwall/jj).
Getting Started
===============
# Getting Started
Installing
----------
## Installing
To start using SJSON, install Go and run `go get`:
......@@ -27,8 +25,8 @@ $ go get -u github.com/tidwall/sjson
This will retrieve the library.
Set a value
-----------
## Set a value
Set sets the value for the specified path.
A path is in dot syntax, such as "name.last" or "age".
This function expects that the json is well-formed and validated.
......@@ -54,11 +52,10 @@ This will print:
{ "name": { "first": "Janet", "last": "Anderson" }, "age": 47 }
```
Path syntax
-----------
## Path syntax
A path is a series of keys separated by a dot.
The dot and colon characters can be escaped with ``\``.
The dot and colon characters can be escaped with `\`.
```json
{
......@@ -72,6 +69,7 @@ The dot and colon characters can be escaped with ``\``.
]
}
```
```
"name.last" >> "Anderson"
"age" >> 37
......@@ -102,8 +100,7 @@ A colon path would look like:
"users.:2313.name" >> "Sara"
```
Supported types
---------------
## Supported types
Pretty much any type is supported:
......@@ -119,11 +116,10 @@ sjson.Set(`{"key":true}`, "key", map[string]interface{}{"hello":"world"})
When a type is not recognized, SJSON will fallback to the `encoding/json` Marshaller.
Examples
--------
## Examples
Set a value from empty document:
```go
value, _ := sjson.Set("", "name", "Tom")
println(value)
......@@ -133,6 +129,7 @@ println(value)
```
Set a nested value from empty document:
```go
value, _ := sjson.Set("", "name.last", "Anderson")
println(value)
......@@ -142,6 +139,7 @@ println(value)
```
Set a new value:
```go
value, _ := sjson.Set(`{"name":{"last":"Anderson"}}`, "name.first", "Sara")
println(value)
......@@ -151,6 +149,7 @@ println(value)
```
Update an existing value:
```go
value, _ := sjson.Set(`{"name":{"last":"Anderson"}}`, "name.last", "Smith")
println(value)
......@@ -160,6 +159,7 @@ println(value)
```
Set a new array value:
```go
value, _ := sjson.Set(`{"friends":["Andy","Carol"]}`, "friends.2", "Sara")
println(value)
......@@ -169,6 +169,7 @@ println(value)
```
Append an array value by using the `-1` key in a path:
```go
value, _ := sjson.Set(`{"friends":["Andy","Carol"]}`, "friends.-1", "Sara")
println(value)
......@@ -178,6 +179,7 @@ println(value)
```
Append an array value that is past the end:
```go
value, _ := sjson.Set(`{"friends":["Andy","Carol"]}`, "friends.4", "Sara")
println(value)
......@@ -187,6 +189,7 @@ println(value)
```
Delete a value:
```go
value, _ := sjson.Delete(`{"name":{"first":"Sara","last":"Anderson"}}`, "name.first")
println(value)
......@@ -196,6 +199,7 @@ println(value)
```
Delete an array value:
```go
value, _ := sjson.Delete(`{"friends":["Andy","Carol"]}`, "friends.1")
println(value)
......@@ -205,6 +209,7 @@ println(value)
```
Delete the last array value:
```go
value, _ := sjson.Delete(`{"friends":["Andy","Carol"]}`, "friends.-1")
println(value)
......@@ -268,9 +273,10 @@ widget.image.hOffset
widget.text.onMouseUp
```
*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.7 and can be be found [here](https://github.com/tidwall/sjson-benchmarks)*.
_These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.7 and can be be found [here](https://github.com/tidwall/sjson-benchmarks)_.
## Contact
Josh Baker [@tidwall](http://twitter.com/tidwall)
## License
......
......@@ -439,7 +439,6 @@ func isOptimisticPath(path string) bool {
// "name.last" >> "Anderson"
// "age" >> 37
// "children.1" >> "Alex"
//
func Set(json, path string, value interface{}) (string, error) {
return SetOptions(json, path, value, nil)
}
......
......@@ -11,7 +11,7 @@ package yamlpath
Terminal nodes have one of the following lexemes: root, lexemeFilterAt, lexemeFilterIntegerLiteral,
lexemeFilterFloatLiteral, lexemeFilterStringLiteral, lexemeFilterBooleanLiteral.
root and lexemeFilterAt nodes also have a slice of lexemes representing the subpath of `$`` or `@``,
root and lexemeFilterAt nodes also have a slice of lexemes representing the subpath of `$ or `@,
respectively.
Non-terminal nodes represent either basic filters (simpler predicates of one or two terminal
......
......@@ -14,6 +14,6 @@ if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
else
NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH |
git apply -3 --directory=$LOCAL_PATH
fi
......@@ -66,11 +66,13 @@ They must be called from within the docker container.
The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system
call dispatch. There are three entry points:
```
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
```
The first and second are the standard ones; they differ only in how many
arguments can be passed to the kernel. The third is for low-level use by the
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
......@@ -156,11 +158,11 @@ from the generated architecture-specific files listed below, and merge these
into a common file for each OS.
The merge is performed in the following steps:
1. Construct the set of common code that is idential in all architecture-specific files.
2. Write this common code to the merged file.
3. Remove the common code from all architecture-specific files.
## Generated files
### `zerrors_${GOOS}_${GOARCH}.go`
......
......@@ -23,8 +23,7 @@ cmd=""
case "$1" in
-syscalls)
for i in zsyscall*go
do
for i in zsyscall*go; do
# Run the command line that appears in the first line
# of the generated file to regenerate it.
sed 1q $i | sed 's;^// ;;' | sh >_$i && gofmt <_$i >$i
......@@ -36,14 +35,15 @@ case "$1" in
run="cat"
cmd="echo"
shift
;;
esac
case "$#" in
0)
;;
0) ;;
*)
echo 'usage: mkall.sh [-n]' 1>&2
exit 2
;;
esac
if [[ "$GOOS" = "linux" ]]; then
......@@ -231,16 +231,17 @@ esac
if [ -n "$mksyscall" ]; then
if [ "$GOOSARCH" == "aix_ppc64" ]; then
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go "
elif [ "$GOOS" == "illumos" ]; then
# illumos code generation requires a --illumos switch
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go"
# illumos implies solaris, so solaris code generation is also required
echo "$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go";
echo "$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go"
else
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"
fi
fi
;;
esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
......
......@@ -432,7 +432,6 @@ includes_SunOS='
#include <termios.h>
'
includes='
#include <sys/types.h>
#include <sys/file.h>
......@@ -705,8 +704,7 @@ struct tuple {
struct tuple errors[] = {
"
for i in $errors
do
for i in $errors; do
echo -E ' {'$i', "'$i'" },'
done
......@@ -715,8 +713,7 @@ struct tuple errors[] = {
struct tuple signals[] = {
"
for i in $signals
do
for i in $signals; do
echo -E ' {'$i', "'$i'" },'
done
......
......@@ -8,9 +8,15 @@ set -e
shopt -s nullglob
winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)"
[[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; }
[[ -n $winerror ]] || {
echo "Unable to find winerror.h" >&2
exit 1
}
ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)"
[[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; }
[[ -n $ntstatus ]] || {
echo "Unable to find ntstatus.h" >&2
exit 1
}
declare -A errors
......
......@@ -8,7 +8,10 @@ set -e
shopt -s nullglob
knownfolders="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)"
[[ -n $knownfolders ]] || { echo "Unable to find KnownFolders.h" >&2; exit 1; }
[[ -n $knownfolders ]] || {
echo "Unable to find KnownFolders.h" >&2
exit 1
}
{
echo "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT."
......
......@@ -77,7 +77,6 @@
// - consider interaction with contexts
// - go vet-style invocations verifier
// - semi-automatic code converter
//
package warnings // import "gopkg.in/warnings.v0"
import (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment