├── .github ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .travis.yml ├── .whitesource ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── assets ├── calc │ ├── bad-functions.yml │ ├── dependencies.yml │ ├── functions.yml │ ├── large-ints.yml │ ├── no-named-variables.yml │ ├── wrong-syntax.yml │ └── wrong-type.yml ├── cartesian-product │ ├── can-be-grabbed.yml │ └── can-be-joined.yml ├── cherry-pick │ ├── fileA.yml │ ├── fileB.yml │ ├── id-based-list.yml │ ├── key-based-list.yml │ ├── name-based-list.yml │ ├── partial-eval.yml │ └── test-exact-names.yml ├── cli_tests ├── color_tester ├── concat │ ├── coerce.yml │ ├── concat.yml │ ├── fail.yml │ ├── loop.yml │ └── multi.yml ├── concourse │ ├── first.yml │ └── second.yml ├── default-array-merge-var │ ├── first.yml │ └── second.yml ├── defer │ ├── grab.yml │ ├── nothing.yml │ ├── or.yml │ ├── reference.yml │ ├── simple-envvar.yml │ ├── simple-float.yml │ ├── simple-int.yml │ ├── simple-nil.yml │ ├── simple-ref.yml │ └── simple-string.yml ├── delete │ ├── simple-string-fileA.yml │ ├── simple-string-fileB.yml │ ├── text-fileA.yml │ └── text-fileB.yml ├── dereference │ ├── bad.yml │ ├── cyclic-data.yml │ ├── first.yml │ ├── multi-value.yml │ ├── multi.yml │ ├── null.yml │ └── second.yml ├── empty │ ├── base.yml │ ├── literals.yml │ └── references.yml ├── errors │ ├── colortest.yml │ ├── multi.yml │ └── multi2.yml ├── fallback-append │ ├── test1.yml │ └── test2.yml ├── fan │ ├── invalid-yaml-with-doc-separator.yml │ ├── invalid-yaml.yml │ ├── multi-doc-1.yml │ ├── multi-doc-2.yml │ ├── multi-doc-3.yml │ ├── multi-doc-source.yml │ └── source.yml ├── file_operator │ ├── sample.txt │ ├── test.txt │ └── test.yml ├── go-patch │ ├── bad.yml │ ├── base.yml │ ├── before.yml │ ├── err.yml │ ├── patch.yml │ └── toMerge.yml ├── home │ ├── auth │ │ └── .vault-token │ ├── svtoken │ │ └── .gitkeep │ └── unauth │ │ └── .gitkeep ├── issue-172 │ ├── explicitmerge1.yml │ ├── explicitmergeonkey1.yml │ ├── implicitmergemap.yml │ └── implicitmergeseq.yml ├── issue-198 │ └── nil-array-elements.yml ├── issue-215 │ ├── hugeint.yml │ └── smallint.yml ├── issue-267 │ ├── option1-fileA.yml │ ├── option1-fileB.yml │ ├── option2-fileA.yml │ ├── option2-fileB.yml │ ├── option3-fileA.yml │ ├── option3-fileB.yml │ ├── option4-fileA.yml │ └── option4-fileB.yml ├── join │ └── issue-155 │ │ └── deps.yml ├── json │ ├── array.yml │ ├── in.yml │ ├── malformed.yml │ └── non-map.yml ├── load │ ├── base-local-abs.yml │ ├── base-local-ref.yml │ ├── base-local.yml │ ├── base-remote.yml │ ├── list.yml │ ├── other.yml │ └── users.yml ├── merge │ ├── bad.yml │ ├── error.yml │ ├── first.json │ ├── first.yml │ ├── multi-doc.yml │ ├── no-key-merge │ ├── non-array-merge.yml │ └── second.yml ├── no-eval │ ├── first.yml │ └── second.yml ├── non-specific-node-tags-issue │ ├── fileA-1.yml │ ├── fileA-2.yml │ └── fileB.yml ├── output-order │ └── sample.yml ├── params │ ├── fail.yml │ ├── global.yml │ └── good.yml ├── prune │ ├── issue-158 │ │ ├── prune.yml │ │ └── test.yml │ ├── issue-250 │ │ ├── fileA.yml │ │ └── fileB.yml │ ├── prune-in-lists │ │ ├── fileA.yml │ │ └── fileB.yml │ ├── prune-issue-in-lists-with-new-entry │ │ ├── fileA.yml │ │ └── fileB.yml │ └── prune-issue-with-inject │ │ ├── fileA.yml │ │ └── fileB.yml ├── readFile │ ├── large │ └── small ├── sort │ ├── base.yml │ └── op.yml ├── static_ips │ ├── issue-156 │ │ └── concat.yml │ ├── jobs.yml │ ├── multi-azs-multi-underprovision.yml │ ├── multi-azs-multi-zone-job.yml │ ├── multi-azs-one-zone-job.yml │ ├── multi-azs-same-index-different-ip.yml │ ├── multi-azs-same-ip-different-index.yml │ ├── multi-azs-same-ip-different-zones.yml │ ├── multi-azs-z2-underprovision.yml │ ├── network.yml │ ├── properties.yml │ └── vips-plus-grab.yml └── vaultinfo │ ├── concat.yml │ ├── duplicate.yml │ ├── go-patch.yml │ ├── improper.yml │ ├── merge1.yml │ ├── merge2.yml │ ├── novault.yml │ └── single.yml ├── cmd └── spruce │ ├── main.go │ └── main_test.go ├── diff.go ├── diff_test.go ├── doc ├── array-merging.md ├── environment-variables-and-defaults.md ├── examples.md ├── fan.md ├── generating-spruce-with-spruce.md ├── integrating-with-cloud-config.md ├── integrating-with-credhub.md ├── merging-go-patch-files.md ├── merging.md ├── operators.md ├── pulling-creds-from-vault.md ├── values-from-aws-parameter-store.md └── values-from-aws-secrets-manager.md ├── errors.go ├── evaluator.go ├── evaluator_test.go ├── examples ├── availability-zones │ ├── jobs.yml │ ├── networks.yml │ ├── output.yml │ └── properties.yml ├── basic │ ├── main.yml │ ├── merge.yml │ └── output.yml ├── calc │ ├── jobs.yml │ ├── meta.yml │ └── result.yml ├── delete │ ├── addon.yml │ ├── main.yml │ └── result.yml ├── inject │ ├── all-in-one.yml │ ├── green.yml │ ├── output.yml │ └── templates.yml ├── inserting │ ├── addon.yml │ ├── main.yml │ └── result.yml ├── joining │ ├── base.yml │ ├── meta.yml │ └── output.yml ├── key-removal │ ├── original.yml │ ├── output.yml │ └── things.yml ├── list-of-maps │ ├── new.yml │ ├── original.yml │ └── output.yml ├── map-replacement │ ├── delete.yml │ ├── insert.yml │ ├── original.yml │ └── output.yml ├── params │ ├── global.yml │ └── local.yml ├── pruning │ ├── base.yml │ ├── jobs.yml │ ├── networks.yml │ └── output.yml └── static-ips │ ├── jobs.yml │ ├── networks.yml │ ├── output.yml │ └── properties.yml ├── go.mod ├── go.sum ├── json.go ├── log ├── log.go └── log_test.go ├── merge.go ├── merge_test.go ├── op_aws.go ├── op_base64.go ├── op_base64_decode.go ├── op_calc.go ├── op_cartesian_product.go ├── op_concat.go ├── op_defer.go ├── op_empty.go ├── op_file.go ├── op_grab.go ├── op_inject.go ├── op_ips.go ├── op_join.go ├── op_keys.go ├── op_load.go ├── op_negate.go ├── op_null.go ├── op_param.go ├── op_prune.go ├── op_shuffle.go ├── op_sort.go ├── op_static_ips.go ├── op_stringify.go ├── op_vault.go ├── operator.go ├── operator_test.go ├── sort_test.go ├── tests └── diff ├── vault_test.go └── vendor ├── github.com ├── BurntSushi │ └── toml │ │ ├── .gitignore │ │ ├── COPYING │ │ ├── README.md │ │ ├── decode.go │ │ ├── deprecated.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── error.go │ │ ├── internal │ │ └── tz.go │ │ ├── lex.go │ │ ├── meta.go │ │ ├── parse.go │ │ ├── type_fields.go │ │ └── type_toml.go ├── Knetic │ └── govaluate │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CONTRIBUTORS │ │ ├── EvaluableExpression.go │ │ ├── EvaluableExpression_sql.go │ │ ├── ExpressionToken.go │ │ ├── LICENSE │ │ ├── MANUAL.md │ │ ├── OperatorSymbol.go │ │ ├── README.md │ │ ├── TokenKind.go │ │ ├── evaluationStage.go │ │ ├── expressionFunctions.go │ │ ├── expressionOutputStream.go │ │ ├── lexerState.go │ │ ├── lexerStream.go │ │ ├── parameters.go │ │ ├── parsing.go │ │ ├── sanitizedParameters.go │ │ ├── stagePlanner.go │ │ ├── test.sh │ │ └── tokenStream.go ├── aws │ └── aws-sdk-go │ │ ├── LICENSE.txt │ │ ├── NOTICE.txt │ │ ├── aws │ │ ├── auth │ │ │ └── bearer │ │ │ │ └── token.go │ │ ├── awserr │ │ │ ├── error.go │ │ │ └── types.go │ │ ├── awsutil │ │ │ ├── copy.go │ │ │ ├── equal.go │ │ │ ├── path_value.go │ │ │ ├── prettify.go │ │ │ └── string_value.go │ │ ├── client │ │ │ ├── client.go │ │ │ ├── default_retryer.go │ │ │ ├── logger.go │ │ │ ├── metadata │ │ │ │ └── client_info.go │ │ │ └── no_op_retryer.go │ │ ├── config.go │ │ ├── context_1_5.go │ │ ├── context_1_9.go │ │ ├── context_background_1_5.go │ │ ├── context_background_1_7.go │ │ ├── context_sleep.go │ │ ├── convert_types.go │ │ ├── corehandlers │ │ │ ├── awsinternal.go │ │ │ ├── handlers.go │ │ │ ├── param_validator.go │ │ │ └── user_agent.go │ │ ├── credentials │ │ │ ├── chain_provider.go │ │ │ ├── context_background_go1.5.go │ │ │ ├── context_background_go1.7.go │ │ │ ├── context_go1.5.go │ │ │ ├── context_go1.9.go │ │ │ ├── credentials.go │ │ │ ├── ec2rolecreds │ │ │ │ └── ec2_role_provider.go │ │ │ ├── endpointcreds │ │ │ │ └── provider.go │ │ │ ├── env_provider.go │ │ │ ├── example.ini │ │ │ ├── processcreds │ │ │ │ └── provider.go │ │ │ ├── shared_credentials_provider.go │ │ │ ├── ssocreds │ │ │ │ ├── doc.go │ │ │ │ ├── os.go │ │ │ │ ├── os_windows.go │ │ │ │ ├── provider.go │ │ │ │ ├── sso_cached_token.go │ │ │ │ └── token_provider.go │ │ │ ├── static_provider.go │ │ │ └── stscreds │ │ │ │ ├── assume_role_provider.go │ │ │ │ └── web_identity_provider.go │ │ ├── csm │ │ │ ├── doc.go │ │ │ ├── enable.go │ │ │ ├── metric.go │ │ │ ├── metric_chan.go │ │ │ ├── metric_exception.go │ │ │ └── reporter.go │ │ ├── defaults │ │ │ ├── defaults.go │ │ │ └── shared_config.go │ │ ├── doc.go │ │ ├── ec2metadata │ │ │ ├── api.go │ │ │ ├── service.go │ │ │ └── token_provider.go │ │ ├── endpoints │ │ │ ├── decode.go │ │ │ ├── defaults.go │ │ │ ├── dep_service_ids.go │ │ │ ├── doc.go │ │ │ ├── endpoints.go │ │ │ ├── legacy_regions.go │ │ │ ├── v3model.go │ │ │ └── v3model_codegen.go │ │ ├── errors.go │ │ ├── jsonvalue.go │ │ ├── logger.go │ │ ├── request │ │ │ ├── connection_reset_error.go │ │ │ ├── handlers.go │ │ │ ├── http_request.go │ │ │ ├── offset_reader.go │ │ │ ├── request.go │ │ │ ├── request_1_7.go │ │ │ ├── request_1_8.go │ │ │ ├── request_context.go │ │ │ ├── request_context_1_6.go │ │ │ ├── request_pagination.go │ │ │ ├── retryer.go │ │ │ ├── timeout_read_closer.go │ │ │ ├── validation.go │ │ │ └── waiter.go │ │ ├── session │ │ │ ├── credentials.go │ │ │ ├── custom_transport.go │ │ │ ├── custom_transport_go1.12.go │ │ │ ├── custom_transport_go1.5.go │ │ │ ├── custom_transport_go1.6.go │ │ │ ├── doc.go │ │ │ ├── env_config.go │ │ │ ├── session.go │ │ │ └── shared_config.go │ │ ├── signer │ │ │ └── v4 │ │ │ │ ├── header_rules.go │ │ │ │ ├── options.go │ │ │ │ ├── request_context_go1.5.go │ │ │ │ ├── request_context_go1.7.go │ │ │ │ ├── stream.go │ │ │ │ ├── uri_path.go │ │ │ │ └── v4.go │ │ ├── types.go │ │ ├── url.go │ │ ├── url_1_7.go │ │ └── version.go │ │ ├── internal │ │ ├── context │ │ │ └── background_go1.5.go │ │ ├── ini │ │ │ ├── ast.go │ │ │ ├── comma_token.go │ │ │ ├── comment_token.go │ │ │ ├── doc.go │ │ │ ├── empty_token.go │ │ │ ├── expression.go │ │ │ ├── fuzz.go │ │ │ ├── ini.go │ │ │ ├── ini_lexer.go │ │ │ ├── ini_parser.go │ │ │ ├── literal_tokens.go │ │ │ ├── newline_token.go │ │ │ ├── number_helper.go │ │ │ ├── op_tokens.go │ │ │ ├── parse_error.go │ │ │ ├── parse_stack.go │ │ │ ├── sep_tokens.go │ │ │ ├── skipper.go │ │ │ ├── statement.go │ │ │ ├── value_util.go │ │ │ ├── visitor.go │ │ │ ├── walker.go │ │ │ └── ws_token.go │ │ ├── sdkio │ │ │ ├── byte.go │ │ │ ├── io_go1.6.go │ │ │ └── io_go1.7.go │ │ ├── sdkmath │ │ │ ├── floor.go │ │ │ └── floor_go1.9.go │ │ ├── sdkrand │ │ │ ├── locked_source.go │ │ │ ├── read.go │ │ │ └── read_1_5.go │ │ ├── sdkuri │ │ │ └── path.go │ │ ├── shareddefaults │ │ │ ├── ecs_container.go │ │ │ ├── shared_config.go │ │ │ ├── shared_config_resolve_home.go │ │ │ └── shared_config_resolve_home_go1.12.go │ │ ├── strings │ │ │ └── strings.go │ │ └── sync │ │ │ └── singleflight │ │ │ ├── LICENSE │ │ │ └── singleflight.go │ │ ├── private │ │ └── protocol │ │ │ ├── host.go │ │ │ ├── host_prefix.go │ │ │ ├── idempotency.go │ │ │ ├── json │ │ │ └── jsonutil │ │ │ │ ├── build.go │ │ │ │ └── unmarshal.go │ │ │ ├── jsonrpc │ │ │ ├── jsonrpc.go │ │ │ └── unmarshal_error.go │ │ │ ├── jsonvalue.go │ │ │ ├── payload.go │ │ │ ├── protocol.go │ │ │ ├── query │ │ │ ├── build.go │ │ │ ├── queryutil │ │ │ │ └── queryutil.go │ │ │ ├── unmarshal.go │ │ │ └── unmarshal_error.go │ │ │ ├── rest │ │ │ ├── build.go │ │ │ ├── payload.go │ │ │ └── unmarshal.go │ │ │ ├── restjson │ │ │ ├── restjson.go │ │ │ └── unmarshal_error.go │ │ │ ├── timestamp.go │ │ │ ├── unmarshal.go │ │ │ ├── unmarshal_error.go │ │ │ └── xml │ │ │ └── xmlutil │ │ │ ├── build.go │ │ │ ├── sort.go │ │ │ ├── unmarshal.go │ │ │ └── xml_to_struct.go │ │ └── service │ │ ├── secretsmanager │ │ ├── api.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── secretsmanageriface │ │ │ └── interface.go │ │ └── service.go │ │ ├── ssm │ │ ├── api.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── service.go │ │ ├── ssmiface │ │ │ └── interface.go │ │ └── waiters.go │ │ ├── sso │ │ ├── api.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── service.go │ │ └── ssoiface │ │ │ └── interface.go │ │ ├── ssooidc │ │ ├── api.go │ │ ├── doc.go │ │ ├── errors.go │ │ └── service.go │ │ └── sts │ │ ├── api.go │ │ ├── customizations.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── service.go │ │ └── stsiface │ │ └── interface.go ├── cloudfoundry-community │ └── vaultkv │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── auth.go │ │ ├── client.go │ │ ├── errors.go │ │ ├── kv.go │ │ ├── kv1.go │ │ ├── kv2.go │ │ ├── mount.go │ │ ├── oidc.go │ │ ├── oidc_windows.go │ │ ├── rekey.go │ │ ├── root.go │ │ ├── sys.go │ │ └── test ├── cppforlife │ └── go-patch │ │ ├── LICENSE │ │ └── patch │ │ ├── array_index.go │ │ ├── array_insertion.go │ │ ├── descriptive_op.go │ │ ├── diff.go │ │ ├── err_op.go │ │ ├── errs.go │ │ ├── find_op.go │ │ ├── op_definition.go │ │ ├── ops.go │ │ ├── pointer.go │ │ ├── remove_op.go │ │ ├── replace_op.go │ │ ├── test_op.go │ │ ├── tokens.go │ │ └── tokens_impl.go ├── geofffranks │ ├── simpleyaml │ │ ├── LICENSE │ │ ├── README.md │ │ └── simpleyaml.go │ └── yaml │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go ├── gonvenience │ ├── bunt │ │ ├── .gitignore │ │ ├── .grenrc.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bunt.go │ │ ├── colors.go │ │ ├── convenience.go │ │ ├── error.go │ │ ├── model.go │ │ ├── parse.go │ │ ├── print.go │ │ └── render.go │ ├── neat │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── box.go │ │ ├── errors.go │ │ ├── neat.go │ │ ├── output.go │ │ ├── output_json.go │ │ ├── output_yaml.go │ │ ├── table.go │ │ └── table_error.go │ ├── term │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── term.go │ ├── text │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── text.go │ ├── wrap │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── error.go │ │ └── wrap.go │ └── ytbx │ │ ├── .gitignore │ │ ├── .grenrc.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── common.go │ │ ├── convert.go │ │ ├── delete.go │ │ ├── errors.go │ │ ├── getting.go │ │ ├── input.go │ │ ├── list_functions.go │ │ ├── map_functions.go │ │ ├── path.go │ │ └── restructure.go ├── gopherjs │ └── gopherjs │ │ ├── LICENSE │ │ └── js │ │ └── js.go ├── hashicorp │ ├── cap │ │ ├── LICENSE │ │ └── util │ │ │ └── util.go │ ├── errwrap │ │ ├── LICENSE │ │ ├── README.md │ │ └── errwrap.go │ ├── go-multierror │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── append.go │ │ ├── flatten.go │ │ ├── format.go │ │ ├── group.go │ │ ├── multierror.go │ │ ├── prefix.go │ │ └── sort.go │ ├── go-secure-stdlib │ │ └── base62 │ │ │ ├── LICENSE │ │ │ └── base62.go │ └── go-uuid │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── uuid.go ├── homeport │ └── dyff │ │ ├── LICENSE │ │ └── pkg │ │ └── dyff │ │ ├── colors.go │ │ ├── core.go │ │ ├── core_identifier.go │ │ ├── models.go │ │ ├── output.go │ │ ├── output_brief.go │ │ ├── output_diff_syntax.go │ │ ├── output_human.go │ │ └── reports.go ├── jmespath │ └── go-jmespath │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── api.go │ │ ├── astnodetype_string.go │ │ ├── functions.go │ │ ├── interpreter.go │ │ ├── lexer.go │ │ ├── parser.go │ │ ├── toktype_string.go │ │ └── util.go ├── jtolds │ └── gls │ │ ├── LICENSE │ │ ├── README.md │ │ ├── context.go │ │ ├── gen_sym.go │ │ ├── gid.go │ │ ├── id_pool.go │ │ ├── stack_tags.go │ │ ├── stack_tags_js.go │ │ └── stack_tags_main.go ├── lucasb-eyer │ └── go-colorful │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorgens.go │ │ ├── colors.go │ │ ├── happy_palettegen.go │ │ ├── hexcolor.go │ │ ├── hsluv-snapshot-rev4.json │ │ ├── hsluv.go │ │ ├── soft_palettegen.go │ │ └── warm_palettegen.go ├── mattn │ ├── go-ciede2000 │ │ ├── LICENSE │ │ ├── README.md │ │ └── ciede2000.go │ └── go-isatty │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.test.sh │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go ├── mitchellh │ ├── go-ps │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── Vagrantfile │ │ ├── process.go │ │ ├── process_darwin.go │ │ ├── process_freebsd.go │ │ ├── process_linux.go │ │ ├── process_solaris.go │ │ ├── process_unix.go │ │ └── process_windows.go │ └── hashstructure │ │ ├── LICENSE │ │ ├── README.md │ │ ├── hashstructure.go │ │ └── include.go ├── sergi │ └── go-diff │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── diffmatchpatch │ │ ├── diff.go │ │ ├── diffmatchpatch.go │ │ ├── match.go │ │ ├── mathutil.go │ │ ├── operation_string.go │ │ ├── patch.go │ │ └── stringutil.go ├── smarty │ └── assertions │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.md │ │ ├── Makefile │ │ ├── README.md │ │ ├── collections.go │ │ ├── doc.go │ │ ├── equal_method.go │ │ ├── equality.go │ │ ├── equality_diff.go │ │ ├── equality_specs.go │ │ ├── filter.go │ │ ├── internal │ │ ├── go-diff │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ └── diffmatchpatch │ │ │ │ ├── diff.go │ │ │ │ ├── diffmatchpatch.go │ │ │ │ ├── match.go │ │ │ │ ├── mathutil.go │ │ │ │ ├── operation_string.go │ │ │ │ ├── patch.go │ │ │ │ └── stringutil.go │ │ ├── go-render │ │ │ ├── LICENSE │ │ │ └── render │ │ │ │ ├── render.go │ │ │ │ └── render_time.go │ │ └── oglematchers │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── any_of.go │ │ │ ├── contains.go │ │ │ ├── deep_equals.go │ │ │ ├── equals.go │ │ │ ├── greater_or_equal.go │ │ │ ├── greater_than.go │ │ │ ├── less_or_equal.go │ │ │ ├── less_than.go │ │ │ ├── matcher.go │ │ │ ├── not.go │ │ │ └── transform_description.go │ │ ├── messages.go │ │ ├── panic.go │ │ ├── quantity.go │ │ ├── serializer.go │ │ ├── strings.go │ │ ├── time.go │ │ └── type.go ├── smartystreets │ └── goconvey │ │ ├── LICENSE.md │ │ └── convey │ │ ├── assertions.go │ │ ├── context.go │ │ ├── convey.goconvey │ │ ├── discovery.go │ │ ├── doc.go │ │ ├── gotest │ │ └── utils.go │ │ ├── init.go │ │ ├── nilReporter.go │ │ ├── reporting │ │ ├── console.go │ │ ├── doc.go │ │ ├── dot.go │ │ ├── gotest.go │ │ ├── init.go │ │ ├── json.go │ │ ├── printer.go │ │ ├── problems.go │ │ ├── reporter.go │ │ ├── reporting.goconvey │ │ ├── reports.go │ │ ├── statistics.go │ │ └── story.go │ │ └── update_assertions.sh ├── starkandwayne │ └── goutils │ │ ├── ansi │ │ └── printf.go │ │ └── tree │ │ ├── cursor.go │ │ ├── err.go │ │ ├── find.go │ │ └── tree.go ├── texttheater │ └── golang-levenshtein │ │ ├── LICENSE │ │ └── levenshtein │ │ └── levenshtein.go ├── virtuald │ └── go-ordered-json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode.go │ │ ├── encode.go │ │ ├── fold.go │ │ ├── indent.go │ │ ├── scanner.go │ │ ├── stream.go │ │ ├── tables.go │ │ └── tags.go ├── voxelbrain │ └── goptions │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTORS.md │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── circle.yml │ │ ├── flag.go │ │ ├── flagset.go │ │ ├── goptions.go │ │ ├── helpfunc.go │ │ ├── marshaler.go │ │ ├── mutexgroup.go │ │ ├── options.go │ │ ├── special_types.go │ │ ├── tagparser.go │ │ └── valueparser.go └── ziutek │ └── utils │ ├── LICENSE │ └── netaddr │ ├── ip.go │ └── mac.go ├── golang.org └── x │ ├── sync │ ├── LICENSE │ ├── PATENTS │ └── syncmap │ │ └── map.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── plan9 │ │ ├── asm.s │ │ ├── asm_plan9_386.s │ │ ├── asm_plan9_amd64.s │ │ ├── asm_plan9_arm.s │ │ ├── const_plan9.go │ │ ├── dir_plan9.go │ │ ├── env_plan9.go │ │ ├── errors_plan9.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mksysnum_plan9.sh │ │ ├── pwd_go15_plan9.go │ │ ├── pwd_plan9.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_plan9.go │ │ ├── zsyscall_plan9_386.go │ │ ├── zsyscall_plan9_amd64.go │ │ ├── zsyscall_plan9_arm.go │ │ └── zsysnum_plan9.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── term │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── term.go │ ├── term_plan9.go │ ├── term_unix.go │ ├── term_unix_bsd.go │ ├── term_unix_other.go │ ├── term_unsupported.go │ ├── term_windows.go │ └── terminal.go ├── gopkg.in ├── yaml.v2 │ ├── .travis.yml │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── yaml.v3 │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | schedule: 5 | interval: "weekly" 6 | target-branch: "master" 7 | labels: 8 | - "dependencies" 9 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | 3 | jobs: 4 | test: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - name: Set up Go 9 | uses: actions/setup-go@v3 10 | with: 11 | go-version: stable 12 | check-latest: true 13 | 14 | - name: Build 15 | run: go build -v ./... 16 | 17 | - name: Test 18 | run: go list ./... | grep -v vendor | xargs go test 19 | 20 | - name: Vet 21 | run: go list ./... | grep -v vendor | xargs go vet 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /spruce 3 | /spruce-* 4 | credentials.yml 5 | releases 6 | artifacts 7 | .svtoken 8 | *.swp 9 | .vscode -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.22 5 | 6 | sudo: false 7 | 8 | script: 9 | - make 10 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "checkRunSettings": { 3 | "vulnerableCheckRunConclusionLevel": "failure" 4 | }, 5 | "issueSettings": { 6 | "minSeverityLevel": "LOW" 7 | } 8 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.18-alpine AS go 2 | 3 | FROM go AS build 4 | RUN apk --no-cache add git 5 | COPY . /go/src/github.com/geofffranks/spruce 6 | RUN cd /go/src/github.com/geofffranks/spruce && \ 7 | CGOENABLED=0 go build \ 8 | -o /usr/bin/spruce \ 9 | -ldflags "-s -w -extldflags '-static' -X main.Version=$( (git describe --tags 2>/dev/null || (git rev-parse HEAD | cut -c-8)) | sed 's/^v//' )" \ 10 | cmd/spruce/main.go 11 | 12 | FROM alpine:latest AS certificates 13 | RUN apk add --no-cache ca-certificates 14 | 15 | FROM scratch 16 | COPY --from=build /usr/bin/spruce /spruce 17 | COPY --from=certificates /etc/ssl/ /etc/ssl/ 18 | ENV PATH=/ 19 | CMD ["/spruce"] 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: vet test build clitests 2 | 3 | vet: 4 | go list ./... | grep -v vendor | xargs go vet 5 | 6 | test: 7 | go list ./... | grep -v vendor | xargs go test 8 | 9 | colortest: build 10 | ./assets/color_tester 11 | 12 | clitests: build 13 | ./assets/cli_tests 14 | 15 | build: 16 | go build ./cmd/spruce 17 | -------------------------------------------------------------------------------- /assets/calc/bad-functions.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | numA: 8.333 4 | numB: 3.666 5 | 6 | properties: 7 | homework: 8 | max: (( calc "max(meta.numA)" )) 9 | min: (( calc "min(meta.numA)" )) 10 | mod: (( calc "mod(meta.numA)" )) 11 | pow: (( calc "pow(meta.numA)" )) 12 | sqrt: (( calc "sqrt(meta.numA, meta.numB)" )) 13 | floor: (( calc "floor(meta.numA, meta.numB)" )) 14 | ceil: (( calc "ceil(meta.numA, meta.numB)" )) 15 | -------------------------------------------------------------------------------- /assets/calc/dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | target_mem: 144 4 | extras: (( grab meta.custom-extras || 0 )) 5 | 6 | jobs: 7 | - name: big_ones 8 | instances: (( calc "floor(meta.target_mem / 32)" )) 9 | 10 | - name: small_ones 11 | instances: (( calc "floor((meta.target_mem - jobs.big_ones.instances * 32) / 16)" )) 12 | 13 | - name: extra_ones 14 | instances: (( calc "2 + meta.extras" )) 15 | -------------------------------------------------------------------------------- /assets/calc/functions.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | numA: 8.333 4 | numB: 3.666 5 | 6 | properties: 7 | homework: 8 | max: (( calc "max(meta.numA, meta.numB)" )) 9 | min: (( calc "min(meta.numA, meta.numB)" )) 10 | mod: (( calc "mod(meta.numA, meta.numB)" )) 11 | pow: (( calc "pow(meta.numA, meta.numB)" )) 12 | sqrt: (( calc "sqrt(meta.numA)" )) 13 | floor: (( calc "floor(meta.numB)" )) 14 | ceil: (( calc "ceil(meta.numA)" )) 15 | -------------------------------------------------------------------------------- /assets/calc/large-ints.yml: -------------------------------------------------------------------------------- 1 | int: (( calc "90 * 86400" )) 2 | float: (( calc "(90 * 86400) + 0.1" )) 3 | -------------------------------------------------------------------------------- /assets/calc/no-named-variables.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: one 4 | instances: (( calc "2 * pi * r" )) 5 | -------------------------------------------------------------------------------- /assets/calc/wrong-syntax.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: zero 4 | instances: 0 5 | 6 | - name: one 7 | instances: (( calc "1 + 1" "2 + 2" )) 8 | 9 | - name: two 10 | instances: (( calc jobs.zero.instances )) 11 | -------------------------------------------------------------------------------- /assets/calc/wrong-type.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | string: "Hello, World!" 4 | nil: ~ 5 | map: { key: value } 6 | list: [ 1, 2, 3, 4 ] 7 | 8 | properties: 9 | homework: 10 | string: (( calc "1.0 * meta.string" )) 11 | nil: (( calc "1.0 * meta.nil" )) 12 | map: (( calc "1.0 * meta.map" )) 13 | list: (( calc "1.0 * meta.list" )) 14 | -------------------------------------------------------------------------------- /assets/cartesian-product/can-be-grabbed.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | fast-tests: 3 | - isolation 4 | slow-tests: 5 | - integration 6 | master-fast-tests: 7 | (( cartesian-product "master-" meta.fast-tests "-tests" )) 8 | master-slow-tests: 9 | - (( concat "master-" meta.slow-tests.0 "-tests" )) 10 | 11 | groups: 12 | - name: master 13 | jobs: (( grab 14 | meta.master-fast-tests 15 | meta.master-slow-tests 16 | "master-dependencies-test" 17 | "master-docker-build" )) 18 | -------------------------------------------------------------------------------- /assets/cartesian-product/can-be-joined.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ips: 3 | - 1.2.3.4 4 | - 2.2.3.4 5 | 6 | ips_with_port: 7 | (( cartesian-product ips ":80" )) 8 | 9 | join_ips_with_port: 10 | (( join "," ips_with_port )) -------------------------------------------------------------------------------- /assets/cherry-pick/fileA.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | some: 3 | deep: 4 | structure: 5 | maplist: 6 | keyA: valueA 7 | 8 | releases: 9 | - name: vb 10 | 11 | jobs: 12 | - name: vb 13 | 14 | properties: 15 | vb: 16 | id: 74a03820-3f81-45ca-afd5-d7d57b947ff1 17 | flags: auth,block,read-only 18 | -------------------------------------------------------------------------------- /assets/cherry-pick/fileB.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | some: 3 | deep: 4 | structure: 5 | maplist: 6 | keyB: valueB 7 | ignoreme: foobar 8 | 9 | releases: 10 | - name: hahn 11 | 12 | jobs: 13 | - name: hahn 14 | 15 | properties: 16 | hahn: 17 | id: b503e54a-c872-4643-a09c-5480c5940d0c 18 | flags: open 19 | -------------------------------------------------------------------------------- /assets/cherry-pick/id-based-list.yml: -------------------------------------------------------------------------------- 1 | list: 2 | - id: one 3 | desc: The first one 4 | version: v1 5 | - id: two 6 | desc: The second one 7 | version: v2 8 | - id: three 9 | desc: The third one 10 | version: v3 11 | 12 | -------------------------------------------------------------------------------- /assets/cherry-pick/key-based-list.yml: -------------------------------------------------------------------------------- 1 | list: 2 | - key: one 3 | desc: The first one 4 | version: v1 5 | - key: two 6 | desc: The second one 7 | version: v2 8 | - key: three 9 | desc: The third one 10 | version: v3 11 | -------------------------------------------------------------------------------- /assets/cherry-pick/name-based-list.yml: -------------------------------------------------------------------------------- 1 | list: 2 | - name: one 3 | desc: The first one 4 | version: v1 5 | - name: two 6 | desc: The second one 7 | version: v2 8 | - name: three 9 | desc: The third one 10 | version: v3 11 | - name: four 12 | desc: The fourth one 13 | version: v4 14 | - name: five 15 | desc: The fifth one 16 | version: v5 17 | - name: six 18 | desc: The sixth one 19 | version: v6 20 | -------------------------------------------------------------------------------- /assets/cherry-pick/partial-eval.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | type: thing 4 | params: 5 | name: (( grab name )) 6 | mode: default 7 | type: (( grab meta.type )) 8 | 9 | env: sandbox 10 | type: (( grab meta.type )) 11 | name: (( concat env "-" type )) 12 | 13 | skipped: (( grab should.throw.an.error.if.evaluated )) 14 | -------------------------------------------------------------------------------- /assets/cherry-pick/test-exact-names.yml: -------------------------------------------------------------------------------- 1 | map: 2 | subkey: this is the real subkey 3 | other: value 4 | subkey: this is a fake subkey 5 | -------------------------------------------------------------------------------- /assets/cli_tests: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cleanup() { 4 | rm -rf ${TMPDIR} 5 | } 6 | 7 | TMPDIR=$(mktemp -d) 8 | trap cleanup QUIT INT EXIT 9 | 10 | cat < ${TMPDIR}/first.yml 11 | --- 12 | first: beginning 13 | EOF 14 | 15 | cat < ${TMPDIR}/last.yml 16 | --- 17 | last: ending 18 | EOF 19 | 20 | cp spruce ${TMPDIR} 21 | pushd ${TMPDIR} 22 | 23 | result=$(echo "first: stdin" | ./spruce merge) 24 | [[ ${result} == "first: stdin" ]] 25 | 26 | result=$(echo "first: stdin" | ./spruce merge -) 27 | [[ ${result} == "first: stdin" ]] 28 | 29 | result=$(echo "first: stdin" | ./spruce merge first.yml - last.yml) 30 | [[ ${result} == "first: stdin\nlast: ending" ]] 31 | 32 | result=$(echo "last: stdin" | ./spruce merge first.yml - last.yml) 33 | [[ ${result} == "first: beginning\nlast: ending" ]] 34 | 35 | popd 36 | -------------------------------------------------------------------------------- /assets/concat/coerce.yml: -------------------------------------------------------------------------------- 1 | local: 2 | domain: "domain.example.com" 3 | version: 1.3 4 | rev: 42 5 | url: (( concat "http://" local.domain "/?v=" local.version "&rev=" local.rev )) 6 | -------------------------------------------------------------------------------- /assets/concat/concat.yml: -------------------------------------------------------------------------------- 1 | local: 2 | sites: 3 | - uuid: aaaaaaaaaaaaaaaaa 4 | - uuid: 1234567890-abcdef 5 | - uuid: bbbbbbbbbbbbbbbbb 6 | env: prod 7 | cluster: 8 | name: mjolnir 9 | ident: (( concat "c=" cluster.name "/" env ";" local.sites.[1].uuid )) 10 | -------------------------------------------------------------------------------- /assets/concat/fail.yml: -------------------------------------------------------------------------------- 1 | local: 2 | sites: 3 | - uuid: 1234567890-abcdef 4 | env: prod 5 | cluster: 6 | name: mjolnir 7 | ident: (( concat "c=" cluster.name "/" env ";" local.sites.[42].uuid )) 8 | -------------------------------------------------------------------------------- /assets/concat/loop.yml: -------------------------------------------------------------------------------- 1 | a: (( concat "a" b )) 2 | b: (( concat a "b" )) 3 | -------------------------------------------------------------------------------- /assets/concat/multi.yml: -------------------------------------------------------------------------------- 1 | # foo shoud be 'quux.bar.baz.foo' 2 | foo: (( concat baz ".foo" )) 3 | bar: (( concat quux ".bar" )) 4 | baz: (( concat bar ".baz" )) 5 | quux: "quux" 6 | -------------------------------------------------------------------------------- /assets/concourse/first.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: thing1 3 | curlies: {{my-variable_123}} 4 | -------------------------------------------------------------------------------- /assets/concourse/second.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - (( append )) 3 | - name: thing2 4 | curlies: {{more}} 5 | -------------------------------------------------------------------------------- /assets/default-array-merge-var/first.yml: -------------------------------------------------------------------------------- 1 | --- 2 | array: 3 | - id: first 4 | value: 123 5 | - id: second 6 | value: 321 7 | -------------------------------------------------------------------------------- /assets/default-array-merge-var/second.yml: -------------------------------------------------------------------------------- 1 | --- 2 | array: 3 | - id: third 4 | value: true 5 | - id: second 6 | value: 987 7 | -------------------------------------------------------------------------------- /assets/defer/grab.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer grab thing )) # (( grab thing )) 2 | grab: beep # beep 3 | thing: boop # boop -------------------------------------------------------------------------------- /assets/defer/nothing.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer )) # should generate an error -------------------------------------------------------------------------------- /assets/defer/or.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer grab this || "that" )) # (( grab this || "that" )) -------------------------------------------------------------------------------- /assets/defer/reference.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer thing )) # (( thing )) 2 | thing: (( grab foo )) # (( thing )) 3 | 4 | # There should not be a dependency loop here, because "thing" should not be 5 | # taken as a dependency referring to the key "thing" -------------------------------------------------------------------------------- /assets/defer/simple-envvar.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer $TESTVAR )) # (( $TESTVAR )) -------------------------------------------------------------------------------- /assets/defer/simple-float.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer 1.23 )) # (( 1.23 )) -------------------------------------------------------------------------------- /assets/defer/simple-int.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer 123 )) # (( 123 )) -------------------------------------------------------------------------------- /assets/defer/simple-nil.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer nil )) # (( nil )) -------------------------------------------------------------------------------- /assets/defer/simple-ref.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer thing )) # (( thing )) -------------------------------------------------------------------------------- /assets/defer/simple-string.yml: -------------------------------------------------------------------------------- 1 | foo: (( defer "thing" )) # (( "thing" )) -------------------------------------------------------------------------------- /assets/delete/simple-string-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - one 5 | - two 6 | - three 7 | - four 8 | - five 9 | -------------------------------------------------------------------------------- /assets/delete/simple-string-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - (( delete "three" )) 5 | - (( delete four )) 6 | -------------------------------------------------------------------------------- /assets/delete/text-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - Leonel Messi 5 | - Cristiano Ronaldo 6 | - Oliver Kahn 7 | 8 | stuff: 9 | default_groups: 10 | - openid 11 | - cloud_controller.read 12 | - cloud_controller.write 13 | - password.write 14 | - uaa.user 15 | - approvals.me 16 | - profile 17 | - roles 18 | - user_attributes 19 | - uaa.offline_token 20 | environment_scripts: 21 | - scripts/configure-HA-hosts.sh 22 | - scripts/forward_logfiles.sh 23 | - scripts/patches/cc_clock_wait_for_api_ready.sh 24 | -------------------------------------------------------------------------------- /assets/delete/text-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - (( delete "Cristiano Ronaldo" )) 5 | 6 | stuff: 7 | default_groups: 8 | - (( delete password.write )) 9 | - (( delete "cloud_controller.write")) 10 | 11 | environment_scripts: 12 | - (( delete scripts/patches/cc_clock_wait_for_api_ready.sh )) 13 | -------------------------------------------------------------------------------- /assets/dereference/bad.yml: -------------------------------------------------------------------------------- 1 | bad: 2 | dereference: (( grab my.value )) 3 | -------------------------------------------------------------------------------- /assets/dereference/cyclic-data.yml: -------------------------------------------------------------------------------- 1 | --- 2 | people: 3 | anne: 4 | givenName: Anne 5 | surName: Bolswenn 6 | ssn: 123456 7 | spouse: (( grab people.bart )) 8 | bart: 9 | givenName: Bartholomew 10 | surName: Jennings 11 | ssn: 456789 12 | spouse: (( grab people.anne )) 13 | -------------------------------------------------------------------------------- /assets/dereference/first.yml: -------------------------------------------------------------------------------- 1 | properties: 2 | client: 3 | servers: (( grab jobs.my-server.static_ips )) 4 | -------------------------------------------------------------------------------- /assets/dereference/multi-value.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: api_z1 3 | instances: 1 4 | networks: 5 | - name: net1 6 | static_ips: (( static_ips(0, 1, 2) )) 7 | - name: api_z2 8 | instances: 1 9 | networks: 10 | - name: net2 11 | static_ips: (( static_ips(0, 1, 2) )) 12 | 13 | networks: 14 | - name: net1 15 | subnets: 16 | - cloud_properties: random 17 | static: 18 | - 192.168.1.2 - 192.168.1.30 19 | - name: net2 20 | subnets: 21 | - cloud_properties: random 22 | static: 23 | - 192.168.2.2 - 192.168.2.30 24 | 25 | properties: 26 | api_servers: (( grab jobs.api_z1.networks.net1.static_ips jobs.api_z2.networks.net2.static_ips )) 27 | api_server_primary: (( grab jobs.api_z1.networks.net1.static_ips.[0] )) 28 | -------------------------------------------------------------------------------- /assets/dereference/multi.yml: -------------------------------------------------------------------------------- 1 | name1: (( grab name2 )) 2 | name2: (( grab name3 )) 3 | name3: (( grab name4 )) 4 | name4: "name" 5 | -------------------------------------------------------------------------------- /assets/dereference/null.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | nil: ~ 3 | value: (( grab meta.nil )) 4 | -------------------------------------------------------------------------------- /assets/dereference/second.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: my-server 3 | static_ips: [192.168.1.0] 4 | -------------------------------------------------------------------------------- /assets/empty/base.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | first: 4 | foo: bar 5 | second: 6 | beep: boop 7 | third: 8 | wom: bat -------------------------------------------------------------------------------- /assets/empty/literals.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | first: (( empty "hash" )) 4 | second: (( empty "array" )) 5 | third: (( empty "string" )) -------------------------------------------------------------------------------- /assets/empty/references.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | first: (( empty hash )) 4 | second: (( empty array )) 5 | third: (( empty string )) -------------------------------------------------------------------------------- /assets/errors/multi.yml: -------------------------------------------------------------------------------- 1 | an-error: (( param "missing param!" )) 2 | another-error: (( grab meta.enoent )) 3 | last-problem: (( concat "https://" meta.missing.host ":8443/" meta.missing.path )) 4 | -------------------------------------------------------------------------------- /assets/errors/multi2.yml: -------------------------------------------------------------------------------- 1 | a: (( param "first" )) 2 | b: (( param "second" )) 3 | c: (( param "third" )) 4 | -------------------------------------------------------------------------------- /assets/fallback-append/test1.yml: -------------------------------------------------------------------------------- 1 | array: 2 | - thing: 1 3 | value: foo 4 | - thing: 2 5 | value: bar 6 | -------------------------------------------------------------------------------- /assets/fallback-append/test2.yml: -------------------------------------------------------------------------------- 1 | array: 2 | - thing: 1 3 | value: baz 4 | -------------------------------------------------------------------------------- /assets/fan/invalid-yaml-with-doc-separator.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :asdf 3 | -------------------------------------------------------------------------------- /assets/fan/invalid-yaml.yml: -------------------------------------------------------------------------------- 1 | :asdf 2 | -------------------------------------------------------------------------------- /assets/fan/multi-doc-1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | doc1: (( grab meta.to-be-grabbed )) 3 | --- 4 | doc2: (( grab meta.to-be-grabbed )) 5 | other: stuff 6 | --- 7 | doc3: (( grab meta.to-be-grabbed )) 8 | --- 9 | no-grab: here 10 | -------------------------------------------------------------------------------- /assets/fan/multi-doc-2.yml: -------------------------------------------------------------------------------- 1 | doc4: (( grab meta.to-be-grabbed )) 2 | --- 3 | doc5: (( grab meta.to-be-grabbed )) 4 | other: stuff 5 | -------------------------------------------------------------------------------- /assets/fan/multi-doc-3.yml: -------------------------------------------------------------------------------- 1 | --- 2 | doc6: 3 | no-grab: here 4 | --- 5 | doc7: 6 | no-grab: here 7 | -------------------------------------------------------------------------------- /assets/fan/multi-doc-source.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | to-be-grabbed: i've-been-grabbed 4 | --- 5 | sdoc: (( grab meta.to-be-grabbed )) -------------------------------------------------------------------------------- /assets/fan/source.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | to-be-grabbed: i've-been-grabbed 3 | -------------------------------------------------------------------------------- /assets/file_operator/test.txt: -------------------------------------------------------------------------------- 1 | This is a test 2 | -------------------------------------------------------------------------------- /assets/file_operator/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | filename: test.yml 4 | 5 | content: 6 | meta_test: 7 | stuff: (( file meta.filename )) 8 | -------------------------------------------------------------------------------- /assets/go-patch/bad.yml: -------------------------------------------------------------------------------- 1 | - this 2 | - isn't 3 | - gopatch 4 | -------------------------------------------------------------------------------- /assets/go-patch/base.yml: -------------------------------------------------------------------------------- 1 | key: 1 2 | 3 | key2: 4 | nested: 5 | super_nested: 2 6 | other: 3 7 | 8 | array: [4,5,6] 9 | 10 | items: 11 | - name: item7 12 | - name: item8 13 | - name: item9 14 | -------------------------------------------------------------------------------- /assets/go-patch/before.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - path: /items/name=item8:before 3 | type: replace 4 | value: 5 | name: 7.5 6 | -------------------------------------------------------------------------------- /assets/go-patch/err.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /key_not_there 3 | value: 10 4 | -------------------------------------------------------------------------------- /assets/go-patch/patch.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /key 3 | value: 10 4 | 5 | - type: replace 6 | path: /new_key? 7 | value: 10 8 | 9 | - type: replace 10 | path: /key2/nested/super_nested 11 | value: 10 12 | 13 | - type: replace 14 | path: /key2/nested?/another_nested/super_nested 15 | value: 10 16 | 17 | - type: replace 18 | path: /array/0 19 | value: 10 20 | 21 | - type: replace 22 | path: /spruce_array_grab? 23 | value: (( grab items )) 24 | -------------------------------------------------------------------------------- /assets/go-patch/toMerge.yml: -------------------------------------------------------------------------------- 1 | more_stuff: is here 2 | 3 | items: 4 | - (( prepend )) 5 | - add spruce stuff in the beginning of the array 6 | -------------------------------------------------------------------------------- /assets/home/auth/.vault-token: -------------------------------------------------------------------------------- 1 | sekrit-toekin 2 | -------------------------------------------------------------------------------- /assets/home/svtoken/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/home/unauth/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geofffranks/spruce/d1b00ad71ac6cdc1196a30b978644fd12c1a7cc6/assets/home/unauth/.gitkeep -------------------------------------------------------------------------------- /assets/issue-172/explicitmerge1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | array-of-maps: 3 | - (( merge )) 4 | - name: { subkey1: yes, subkey2: no } -------------------------------------------------------------------------------- /assets/issue-172/explicitmergeonkey1.yml: -------------------------------------------------------------------------------- 1 | array-of-maps: 2 | - (( merge on mergekey )) 3 | - mergekey: { subkey1: yes, subkey2: no } -------------------------------------------------------------------------------- /assets/issue-172/implicitmergemap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | array-of-maps: 3 | - name: { subkey1: yes, subkey2: no } -------------------------------------------------------------------------------- /assets/issue-172/implicitmergeseq.yml: -------------------------------------------------------------------------------- 1 | --- 2 | array-of-maps: 3 | - name: [ subkey1, subkey2 ] -------------------------------------------------------------------------------- /assets/issue-198/nil-array-elements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | explicit_nil: 3 | - ~ 4 | - stuff 5 | 6 | empty_nil: 7 | - 8 | - more stuff 9 | 10 | nested_nil: 11 | - thing: has stuff 12 | stuff: 13 | - ~ 14 | - nested nil above 15 | 16 | latter_elements_nil: 17 | - stuff 18 | - ~ 19 | -------------------------------------------------------------------------------- /assets/issue-215/hugeint.yml: -------------------------------------------------------------------------------- 1 | foo: (( concat "-> " 6239871649276491287621342 " <-" )) -------------------------------------------------------------------------------- /assets/issue-215/smallint.yml: -------------------------------------------------------------------------------- 1 | foo: (( concat "-> " 3 " <-" )) -------------------------------------------------------------------------------- /assets/issue-267/option1-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - name: zero 6 | - name: one 7 | -------------------------------------------------------------------------------- /assets/issue-267/option1-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - name: two 6 | - (( delete name "zero" )) 7 | 8 | -------------------------------------------------------------------------------- /assets/issue-267/option2-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - name: zero 6 | - name: one 7 | -------------------------------------------------------------------------------- /assets/issue-267/option2-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - (( merge )) 6 | - name: two 7 | - (( delete name "zero" )) 8 | -------------------------------------------------------------------------------- /assets/issue-267/option3-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - name: zero 6 | - name: one 7 | -------------------------------------------------------------------------------- /assets/issue-267/option3-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - (( merge on name )) 6 | - name: two 7 | - (( delete name "zero" )) 8 | -------------------------------------------------------------------------------- /assets/issue-267/option4-fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - job_name: zero 6 | - job_name: one 7 | -------------------------------------------------------------------------------- /assets/issue-267/option4-fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | serverFiles: 3 | prometheus.yml: 4 | scrape_configs: 5 | - (( merge on job_name )) 6 | - job_name: two 7 | - (( delete job_name "zero" )) 8 | -------------------------------------------------------------------------------- /assets/join/issue-155/deps.yml: -------------------------------------------------------------------------------- 1 | --- 2 | greeting: hello 3 | 4 | b: 5 | - (( grab greeting )) 6 | - world 7 | 8 | z: 9 | - (( grab greeting )) 10 | - bye 11 | 12 | output: 13 | - (( join " " b )) 14 | - (( join " " z )) 15 | -------------------------------------------------------------------------------- /assets/json/array.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - map: 3 | list: 4 | - string 5 | - 42 6 | - map: "of things" 7 | - 42 8 | - string 9 | - ["embedded-list"] 10 | 11 | -------------------------------------------------------------------------------- /assets/json/in.yml: -------------------------------------------------------------------------------- 1 | --- 2 | map: 3 | list: 4 | - string 5 | - 42 6 | - map: "of things" 7 | -------------------------------------------------------------------------------- /assets/json/malformed.yml: -------------------------------------------------------------------------------- 1 | - this 2 | - is 3 | - not 4 | - a 5 | - map 6 | -------------------------------------------------------------------------------- /assets/json/non-map.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - 1 3 | -------------------------------------------------------------------------------- /assets/load/base-local-abs.yml: -------------------------------------------------------------------------------- 1 | params: 2 | users: (( load "/Users/dbell/code/src/github.com/geofffranks/spruce/users.yml" )) 3 | -------------------------------------------------------------------------------- /assets/load/base-local-ref.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | path: (( concat $PWD "/../../assets/load/users.yml" )) 3 | 4 | params: 5 | users: (( load meta.path )) 6 | -------------------------------------------------------------------------------- /assets/load/base-local.yml: -------------------------------------------------------------------------------- 1 | --- 2 | yet: 3 | another: 4 | yaml: 5 | structure: 6 | load: (( load "assets/load/other.yml" )) 7 | -------------------------------------------------------------------------------- /assets/load/base-remote.yml: -------------------------------------------------------------------------------- 1 | --- 2 | yet: 3 | another: 4 | yaml: 5 | structure: 6 | load: (( load "http://localhost:31337/assets/load/list.yml" )) 7 | -------------------------------------------------------------------------------- /assets/load/list.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - one 3 | - two 4 | -------------------------------------------------------------------------------- /assets/load/other.yml: -------------------------------------------------------------------------------- 1 | --- 2 | map: 3 | key: value 4 | 5 | simple-list: 6 | - one 7 | - two 8 | 9 | complex-list: 10 | - name: one 11 | - name: two 12 | -------------------------------------------------------------------------------- /assets/load/users.yml: -------------------------------------------------------------------------------- 1 | - name: bob 2 | color: green 3 | 4 | - name: fred 5 | color: red 6 | 7 | -------------------------------------------------------------------------------- /assets/merge/bad.yml: -------------------------------------------------------------------------------- 1 | - these 2 | - should 3 | - be 4 | - maps 5 | -------------------------------------------------------------------------------- /assets/merge/error.yml: -------------------------------------------------------------------------------- 1 | array_inline: 2 | - (( merge )) 3 | - string 4 | -------------------------------------------------------------------------------- /assets/merge/first.json: -------------------------------------------------------------------------------- 1 | { 2 | "array_append": [ 3 | "one", 4 | "two" 5 | ], 6 | "array_default": [ 7 | "first", 8 | "second", 9 | "third" 10 | ], 11 | "array_inline": [ 12 | { 13 | "name": "first_elem", 14 | "val": "initial" 15 | }, 16 | "second_elem_is_scalar" 17 | ], 18 | "array_map_default": [ 19 | { 20 | "k1": "key 1", 21 | "k2": "key 2", 22 | "name": "AAA" 23 | }, 24 | { 25 | "k3": "original", 26 | "name": "BBB" 27 | } 28 | ], 29 | "array_prepend": [ 30 | "four", 31 | "five" 32 | ], 33 | "array_replace": [ 34 | "a", 35 | "b", 36 | "c" 37 | ], 38 | "key": "value", 39 | "map": { 40 | "key": "value" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/merge/first.yml: -------------------------------------------------------------------------------- 1 | key: value 2 | array_append: 3 | - one 4 | - two 5 | array_prepend: 6 | - four 7 | - five 8 | array_inline: 9 | - name: first_elem 10 | val: initial 11 | - second_elem_is_scalar 12 | array_default: 13 | - first 14 | - second 15 | - third 16 | array_replace: 17 | - a 18 | - b 19 | - c 20 | array_map_default: 21 | - name: AAA 22 | k1: key 1 23 | k2: key 2 24 | - name: BBB 25 | k3: original 26 | map: 27 | key: value 28 | -------------------------------------------------------------------------------- /assets/merge/multi-doc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: 3 | data: 4 | test01: "stuff" 5 | --- 6 | doc: 7 | data: 8 | test02: "morestuff" -------------------------------------------------------------------------------- /assets/merge/no-key-merge: -------------------------------------------------------------------------------- 1 | array_map_default: 2 | - (( merge on custom )) 3 | - name: bb8 4 | custom: asdf 5 | k1: failure 6 | -------------------------------------------------------------------------------- /assets/merge/non-array-merge.yml: -------------------------------------------------------------------------------- 1 | key: (( merge )) 2 | -------------------------------------------------------------------------------- /assets/merge/second.yml: -------------------------------------------------------------------------------- 1 | key: overridden 2 | array_append: 3 | - (( append )) 4 | - three 5 | array_prepend: 6 | - (( prepend )) 7 | - three 8 | array_inline: 9 | - (( inline )) 10 | - val: overwritten 11 | - second_elem was overwritten 12 | - third elem is appended 13 | array_replace: 14 | - (( replace )) 15 | - [1,2,3] 16 | array_default: 17 | - FIRST 18 | - SECOND 19 | array_map_default: 20 | - name: BBB 21 | k2: final 22 | - name: AAA 23 | k2: updated 24 | map: 25 | key2: val2 26 | -------------------------------------------------------------------------------- /assets/no-eval/first.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: route 3 | - (( append )) 4 | - name: cell 5 | 6 | param: (( param "Fill this in later" )) 7 | 8 | properties: 9 | no_eval: (( grab property )) 10 | loggregator: true 11 | no_prune: (( prune )) 12 | -------------------------------------------------------------------------------- /assets/no-eval/second.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: cc_bridge 3 | - (( prepend )) 4 | - name: consul 5 | 6 | injected_jobs: 7 | .: (( inject jobs )) 8 | properties: 9 | not_empty: not_empty 10 | -------------------------------------------------------------------------------- /assets/non-specific-node-tags-issue/fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | some: 3 | yaml: 4 | structure: 5 | someotherkey: value 6 | -------------------------------------------------------------------------------- /assets/output-order/sample.yml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | cc: 4 | quota_definitions: 5 | q256MB: 6 | non_basic_services_allowed: true 7 | q2GB: 8 | non_basic_services_allowed: true 9 | q4GB: 10 | non_basic_services_allowed: true 11 | -------------------------------------------------------------------------------- /assets/params/fail.yml: -------------------------------------------------------------------------------- 1 | networks: specified 2 | storage: 4096 3 | cpu: 3 4 | # nested key is missing! 5 | -------------------------------------------------------------------------------- /assets/params/global.yml: -------------------------------------------------------------------------------- 1 | networks: (( param "Please specify networks!" )) 2 | storage: 8192 3 | nested: 4 | key: 5 | override: (( param "provide nested override" )) 6 | -------------------------------------------------------------------------------- /assets/params/good.yml: -------------------------------------------------------------------------------- 1 | networks: 2 | - yes 3 | storage: 4096 4 | cpu: 3 5 | nested: 6 | key: 7 | override: yes 8 | -------------------------------------------------------------------------------- /assets/prune/issue-158/prune.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test2: (( prune )) 3 | -------------------------------------------------------------------------------- /assets/prune/issue-158/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test1: (( grab test2.test )) 3 | test2: 4 | test: t2 5 | -------------------------------------------------------------------------------- /assets/prune/issue-250/fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | list: 3 | - name: one 4 | params: 5 | preload: true 6 | fail-fast: false 7 | 8 | - name: two 9 | params: 10 | preload: true 11 | fail-fast: false 12 | -------------------------------------------------------------------------------- /assets/prune/issue-250/fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | list: 3 | - name: two 4 | params: 5 | preload: false 6 | fail-fast: (( prune )) 7 | 8 | - (( prepend )) 9 | - name: zero 10 | params: 11 | preload: true 12 | fail-fast: false 13 | -------------------------------------------------------------------------------- /assets/prune/prune-in-lists/fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - one 5 | - two 6 | - three 7 | -------------------------------------------------------------------------------- /assets/prune/prune-in-lists/fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | list: 4 | - one 5 | - (( prune )) 6 | -------------------------------------------------------------------------------- /assets/prune/prune-issue-in-lists-with-new-entry/fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | list: 3 | - name: A 4 | release: A 5 | version: A 6 | 7 | - name: B 8 | release: B 9 | version: B 10 | 11 | - name: C 12 | release: C 13 | version: C 14 | -------------------------------------------------------------------------------- /assets/prune/prune-issue-in-lists-with-new-entry/fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | list: 3 | - name: D 4 | release: D 5 | version: (( prune )) 6 | -------------------------------------------------------------------------------- /assets/prune/prune-issue-with-inject/fileA.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | default: 4 | templates: 5 | - name: one 6 | - name: two 7 | update: 8 | canaries: 1 9 | max_in_flight: 3 10 | 11 | jobs: 12 | - name: main-job 13 | <<<: (( inject meta.default )) 14 | instances: 2 15 | -------------------------------------------------------------------------------- /assets/prune/prune-issue-with-inject/fileB.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: another-job 4 | <<<: (( inject meta.default )) 5 | instances: 1 6 | update: 7 | canaries: 2 8 | max_in_flight: (( prune )) 9 | -------------------------------------------------------------------------------- /assets/readFile/large: -------------------------------------------------------------------------------- 1 | over 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to readover 512 bytes of data to read 2 | -------------------------------------------------------------------------------- /assets/readFile/small: -------------------------------------------------------------------------------- 1 | under 512 bytes of data to read 2 | -------------------------------------------------------------------------------- /assets/sort/op.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name_list: (( sort )) 3 | key_list: (( sort by key )) 4 | foobar_list: (( sort by foobar )) 5 | int_list: (( sort )) 6 | float_list: (( sort )) 7 | -------------------------------------------------------------------------------- /assets/static_ips/issue-156/concat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | network_prefix: "10.4" 4 | 5 | networks: 6 | - name: cf1 7 | subnets: 8 | - range: 10.4.36.0/24 9 | static: [ (( concat meta.network_prefix ".5.4 - " meta.network_prefix ".5.100" )) ] 10 | 11 | jobs: 12 | - name: pepe 13 | instances: 1 14 | networks: 15 | - name: cf1 16 | static_ips: (( static_ips(0) )) -------------------------------------------------------------------------------- /assets/static_ips/jobs.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: api_z1 3 | instances: 3 4 | networks: 5 | - name: net1 6 | static_ips: (( static_ips(0, 1, 2) )) 7 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-multi-underprovision.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 1 5 | azs: [z1, z2, z3] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(16) )) # should fail saying pool is only 16 big 9 | # definitely shouldn't say pool is 48 big 10 | # (# azs * size of pool == 48 in this case) 11 | networks: 12 | - name: net1 13 | subnets: 14 | - azs: [ z1, z2, z3 ] 15 | static: 16 | - 10.0.0.1 - 10.0.0.15 17 | - azs: [z1] 18 | static: 19 | - 10.1.1.1 20 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-multi-zone-job.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 2 5 | azs: [z1, z2, z3] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(15, 16) )) # will grab 10.1.1.1 and 10.2.2.2 9 | # from the 2nd/3rd subnet definitions 10 | networks: 11 | - name: net1 12 | subnets: 13 | - azs: [ z1, z2, z3 ] 14 | static: 15 | - 10.0.0.1 - 10.0.0.15 16 | - azs: [z1] 17 | static: 18 | - 10.1.1.1 19 | - azs: [z2] 20 | static: 21 | - 10.2.2.2 22 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-one-zone-job.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - azs: 3 | - z1 4 | instances: 2 5 | name: static_z1 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(0, 15) )) 9 | networks: 10 | - name: net1 11 | subnets: 12 | - azs: 13 | - z1 14 | - z2 15 | - z3 16 | static: 17 | - 10.0.0.1 - 10.0.0.15 18 | - azs: 19 | - z1 20 | static: 21 | - 10.1.1.1 22 | - azs: 23 | - z2 24 | static: 25 | - 10.2.2.2 26 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-same-index-different-ip.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 1 5 | azs: [z1] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(15) )) 9 | - name: static_z2 10 | instances: 1 11 | azs: [z2] 12 | networks: 13 | - name: net1 14 | static_ips: (( static_ips(15) )) 15 | networks: 16 | - name: net1 17 | subnets: 18 | - azs: [ z1, z2, z3 ] 19 | static: 20 | - 10.0.0.1 - 10.0.0.15 21 | - azs: [z1] 22 | static: 23 | - 10.1.1.1 24 | - azs: [z2] 25 | static: 26 | - 10.2.2.2 27 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-same-ip-different-index.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 1 5 | azs: [z1, z2, z3] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(16) )) 9 | - name: static_z2 10 | instances: 1 11 | azs: [z2] 12 | networks: 13 | - name: net1 14 | static_ips: (( static_ips(15) )) 15 | networks: 16 | - name: net1 17 | subnets: 18 | - azs: [ z1, z2, z3 ] 19 | static: 20 | - 10.0.0.1 - 10.0.0.15 21 | - azs: [z1] 22 | static: 23 | - 10.1.1.1 24 | - azs: [z2] 25 | static: 26 | - 10.2.2.2 27 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-same-ip-different-zones.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 1 5 | azs: [z1] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(14) )) 9 | - name: static_z2 10 | instances: 1 11 | azs: [z2] 12 | networks: 13 | - name: net1 14 | static_ips: (( static_ips(14) )) 15 | networks: 16 | - name: net1 17 | subnets: 18 | - azs: [ z1, z2, z3 ] 19 | static: 20 | - 10.0.0.1 - 10.0.0.15 21 | - azs: [z1] 22 | static: 23 | - 10.1.1.1 24 | - azs: [z2] 25 | static: 26 | - 10.2.2.2 27 | -------------------------------------------------------------------------------- /assets/static_ips/multi-azs-z2-underprovision.yml: -------------------------------------------------------------------------------- 1 | 2 | jobs: 3 | - name: static_z1 4 | instances: 1 5 | azs: [z2] 6 | networks: 7 | - name: net1 8 | static_ips: (( static_ips(15) )) # should fail to grab 10.1.1.1, giving 9 | # an index offset error - z2 only has 15 IPs 10 | networks: 11 | - name: net1 12 | subnets: 13 | - azs: [ z1, z2, z3 ] 14 | static: 15 | - 10.0.0.1 - 10.0.0.15 16 | - azs: [z1] 17 | static: 18 | - 10.1.1.1 19 | -------------------------------------------------------------------------------- /assets/static_ips/network.yml: -------------------------------------------------------------------------------- 1 | networks: 2 | - name: net1 3 | subnets: 4 | - static: 5 | - 10.0.0.2 - 10.0.0.20 6 | -------------------------------------------------------------------------------- /assets/static_ips/properties.yml: -------------------------------------------------------------------------------- 1 | properties: 2 | api_servers: (( grab jobs.api_z1.networks.net1.static_ips )) 3 | -------------------------------------------------------------------------------- /assets/static_ips/vips-plus-grab.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | ips: 3 | - 1.2.3.4 4 | 5 | networks: 6 | - name: stuff 7 | subnets: 8 | - static: (( grab meta.ips )) 9 | - name: stuff2 10 | type: vip 11 | 12 | jobs: 13 | - name: bosh 14 | instances: 1 15 | networks: 16 | - name: stuff 17 | static_ips: (( static_ips(0) )) 18 | -------------------------------------------------------------------------------- /assets/vaultinfo/concat.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | prefix: imaprefix 3 | 4 | foo: 5 | bar: (( vault meta.prefix "/beep:boop" )) 6 | wom: (( vault meta.prefix "/hello:world" )) 7 | bat: (( vault meta.prefix "/cup:cake" )) -------------------------------------------------------------------------------- /assets/vaultinfo/duplicate.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | foo: (( vault "secret/bar:beep" )) 3 | otherfoo: (( vault "secret/bar:beep" )) -------------------------------------------------------------------------------- /assets/vaultinfo/go-patch.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /new_key? 3 | value: (( vault "secret/blork:blork" )) 4 | -------------------------------------------------------------------------------- /assets/vaultinfo/improper.yml: -------------------------------------------------------------------------------- 1 | {{{{ -------------------------------------------------------------------------------- /assets/vaultinfo/merge1.yml: -------------------------------------------------------------------------------- 1 | foo: (( vault "secret/foo:bar" )) 2 | bar: (( vault "secret/beep:boop" )) -------------------------------------------------------------------------------- /assets/vaultinfo/merge2.yml: -------------------------------------------------------------------------------- 1 | bar: (( vault "secret/meep:meep" )) -------------------------------------------------------------------------------- /assets/vaultinfo/novault.yml: -------------------------------------------------------------------------------- 1 | hello: (( grab message )) 2 | message: world -------------------------------------------------------------------------------- /assets/vaultinfo/single.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | foo: (( vault "secret/bar:beep" )) -------------------------------------------------------------------------------- /doc/integrating-with-credhub.md: -------------------------------------------------------------------------------- 1 | ## Can I use Spruce with CredHub? 2 | 3 | Absolutely. In most cases, CredHub credentials are specified in YAML using a syntax 4 | that looks very similar to that of a `spruce` operator. Unfortunately, this will cause 5 | errors with `spruce`, as it thinks it found an unknown operator. To counter-act this, 6 | just use the `((!...))` notation wherever you would use CredHub's `((...))` notation, 7 | like this: 8 | 9 | ``` 10 | --- 11 | secret: 12 | password: ((!from_credhub)) 13 | ``` 14 | 15 | This will be ignored in `spruce`, and output `((!from_credhub))` as the value for 16 | `secret.password`. When BOSH reads this in, it will handle dropping the `!` for 17 | you, and all will be well. 18 | 19 | ## Ingesting templates written for CredHub 20 | 21 | If you have an upstream template that you wish to use with `spruce`, you can 22 | run a `sed` on them, to replace the `((...))` notation with `((!...))`, and 23 | they will be ready to use with `spruce`. 24 | -------------------------------------------------------------------------------- /examples/availability-zones/jobs.yml: -------------------------------------------------------------------------------- 1 | instance_groups: 2 | - name: staticIP 3 | instances: 3 4 | azs: [z1,z2] 5 | networks: 6 | - name: net1 7 | static_ips: (( static_ips(0, "z2:2", "z1:3") )) 8 | - name: api 9 | instances: 3 10 | azs: [z1] 11 | networks: 12 | - name: net1 13 | static_ips: (( static_ips(1, "z1:4", 5) )) 14 | - name: web 15 | instances: 3 16 | networks: 17 | - name: net1 18 | static_ips: (( static_ips(9, 10, 11) )) 19 | -------------------------------------------------------------------------------- /examples/availability-zones/networks.yml: -------------------------------------------------------------------------------- 1 | networks: 2 | - name: net1 3 | subnets: 4 | - cloud_properties: random 5 | az: z1 6 | static: 7 | - 192.168.0.1 - 192.168.0.10 8 | - cloud_properties: random 9 | az: z2 10 | static: 11 | - 192.168.2.1 - 192.168.2.10 12 | -------------------------------------------------------------------------------- /examples/availability-zones/properties.yml: -------------------------------------------------------------------------------- 1 | properties: 2 | staticIP_servers: (( grab instance_groups.staticIP.networks.net1.static_ips )) 3 | api_servers: (( grab instance_groups.api.networks.net1.static_ips )) 4 | web_servers: (( grab instance_groups.web.networks.net1.static_ips )) 5 | -------------------------------------------------------------------------------- /examples/basic/main.yml: -------------------------------------------------------------------------------- 1 | top: 2 | orig_key: This is a string attached to a key 3 | number: 50 4 | array1: 5 | - first element 6 | - second element 7 | - third element 8 | map: 9 | key1: v1 10 | key2: v2 11 | key3: 12 | subkey1: vv1 13 | subkey2: vv2 14 | subkey3: 15 | - nested element 1 16 | - nested element 2 17 | 18 | 1: 430.0 19 | 2: this starts as a string 20 | array2: 21 | - 1 22 | - 2 23 | - 3 24 | - 4 25 | inline_array_merge: 26 | - will be overwritten 27 | - this: will 28 | be: merged 29 | -------------------------------------------------------------------------------- /examples/basic/merge.yml: -------------------------------------------------------------------------------- 1 | top: 2 | new_key: this is added 3 | orig_key: this is replaced 4 | map: 5 | key4: added key 6 | key1: replaced key 7 | key2: ~ 8 | key3: 9 | subkey3: 10 | - (( append )) 11 | - nested element 3 12 | array1: 13 | - (( prepend )) 14 | - prepend this 15 | array2: 16 | - over 17 | - ridden 18 | - array 19 | 1: You can change types too 20 | 2: 21 | even: drastically 22 | to: from scalars to maps/lists 23 | inline_array_merge: 24 | - (( inline )) 25 | - this has been overwritten 26 | - be: overwritten 27 | merging: success! 28 | othertop: you can add new top level keys too 29 | -------------------------------------------------------------------------------- /examples/basic/output.yml: -------------------------------------------------------------------------------- 1 | othertop: you can add new top level keys too 2 | top: 3 | 1: You can change types too 4 | 2: 5 | even: drastically 6 | to: from scalars to maps/lists 7 | array1: 8 | - prepend this 9 | - first element 10 | - second element 11 | - third element 12 | array2: 13 | - over 14 | - ridden 15 | - array 16 | - 4 17 | inline_array_merge: 18 | - this has been overwritten 19 | - be: overwritten 20 | merging: success! 21 | this: will 22 | map: 23 | key1: replaced key 24 | key2: null 25 | key3: 26 | subkey1: vv1 27 | subkey2: vv2 28 | subkey3: 29 | - nested element 1 30 | - nested element 2 31 | - nested element 3 32 | key4: added key 33 | new_key: this is added 34 | number: 50 35 | orig_key: this is replaced 36 | -------------------------------------------------------------------------------- /examples/calc/jobs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: big_ones 4 | resource_pool: 32G_boxes 5 | instances: (( calc "floor(meta.target_mem / 32)" )) 6 | 7 | - name: small_ones 8 | resource_pool: 16G_boxes 9 | instances: (( calc "floor((meta.target_mem - jobs.big_ones.instances * 32) / 16)" )) 10 | -------------------------------------------------------------------------------- /examples/calc/meta.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | target_mem: 144 4 | -------------------------------------------------------------------------------- /examples/calc/result.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - instances: 4 3 | name: big_ones 4 | resource_pool: 32G_boxes 5 | - instances: 1 6 | name: small_ones 7 | resource_pool: 16G_boxes 8 | -------------------------------------------------------------------------------- /examples/delete/addon.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - (( delete name "ccdb" )) 4 | - (( delete "dea" )) 5 | -------------------------------------------------------------------------------- /examples/delete/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: consul 4 | instances: 1 5 | - name: nats 6 | instances: 2 7 | - name: ccdb 8 | instances: 3 9 | - name: uaadb 10 | instances: 4 11 | - name: dea 12 | instances: 5 13 | - name: api 14 | instances: 6 15 | -------------------------------------------------------------------------------- /examples/delete/result.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - instances: 1 3 | name: consul 4 | - instances: 2 5 | name: nats 6 | - instances: 4 7 | name: uaadb 8 | - instances: 6 9 | name: api 10 | -------------------------------------------------------------------------------- /examples/inject/all-in-one.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | template: &template 3 | color: blue 4 | size: small 5 | 6 | green: 7 | <<: *template 8 | color: green 9 | -------------------------------------------------------------------------------- /examples/inject/green.yml: -------------------------------------------------------------------------------- 1 | green: 2 | woot: (( inject meta.template )) 3 | color: green 4 | -------------------------------------------------------------------------------- /examples/inject/output.yml: -------------------------------------------------------------------------------- 1 | green: 2 | color: green 3 | size: small 4 | -------------------------------------------------------------------------------- /examples/inject/templates.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | template: 3 | color: blue 4 | size: small 5 | -------------------------------------------------------------------------------- /examples/inserting/addon.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - (( insert after "dea" )) 4 | - name: dea_v2 5 | instances: 2 6 | -------------------------------------------------------------------------------- /examples/inserting/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: consul 4 | instances: 1 5 | - name: nats 6 | instances: 2 7 | - name: ccdb 8 | instances: 2 9 | - name: uaadb 10 | instances: 2 11 | - name: dea 12 | instances: 8 13 | - name: api 14 | instances: 2 15 | -------------------------------------------------------------------------------- /examples/inserting/result.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - instances: 1 4 | name: consul 5 | - instances: 2 6 | name: nats 7 | - instances: 2 8 | name: ccdb 9 | - instances: 2 10 | name: uaadb 11 | - instances: 8 12 | name: dea 13 | - instances: 2 14 | name: dea_v2 15 | - instances: 2 16 | name: api 17 | -------------------------------------------------------------------------------- /examples/joining/base.yml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | uaa: 4 | clients: 5 | admin: 6 | scope: uaa.none 7 | id: admin 8 | secret: something-from-the-vault 9 | authorized-grant-types: client_credentials 10 | authorities: (( join "," meta.authorities meta.additional )) 11 | -------------------------------------------------------------------------------- /examples/joining/meta.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | authorities: 4 | - password.write 5 | - clients.write 6 | - clients.read 7 | - scim.write 8 | 9 | additional: 10 | - scim.read 11 | - uaa.admin 12 | - clients.secret 13 | -------------------------------------------------------------------------------- /examples/joining/output.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | authorities: 4 | - password.write 5 | - clients.write 6 | - clients.read 7 | - scim.write 8 | 9 | additional: 10 | - scim.read 11 | - uaa.admin 12 | - clients.secret 13 | 14 | properties: 15 | uaa: 16 | clients: 17 | admin: 18 | authorities: password.write,clients.write,clients.read,scim.write,scim.read,uaa.admin,clients.secret 19 | authorized-grant-types: client_credentials 20 | id: admin 21 | scope: uaa.none 22 | secret: something-from-the-vault 23 | -------------------------------------------------------------------------------- /examples/key-removal/original.yml: -------------------------------------------------------------------------------- 1 | deleteme: 2 | thing: 3 | foo: 1 4 | bar: 2 5 | -------------------------------------------------------------------------------- /examples/key-removal/output.yml: -------------------------------------------------------------------------------- 1 | things: 2 | - name: first-thing 3 | foo: 1 4 | - name: second-thing 5 | bar: 2 6 | -------------------------------------------------------------------------------- /examples/key-removal/things.yml: -------------------------------------------------------------------------------- 1 | things: 2 | - name: first-thing 3 | foo: (( grab deleteme.thing.foo )) 4 | - name: second-thing 5 | bar: (( grab deleteme.thing.bar )) 6 | -------------------------------------------------------------------------------- /examples/list-of-maps/new.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: newjob_z1 3 | instances: 3 4 | resource_pool: small 5 | properties: 6 | this: is a job defined solely in new.yml 7 | - name: concatenator_z1 8 | properties: 9 | this: is a new property added to an existing job 10 | -------------------------------------------------------------------------------- /examples/list-of-maps/original.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: concatenator_z1 3 | instances: 5 4 | resource_pool: small 5 | properties: 6 | spruce: is cool 7 | - name: oldjob_z1 8 | instances: 4 9 | resource_pool: small 10 | properties: 11 | this: will show up in the end 12 | -------------------------------------------------------------------------------- /examples/list-of-maps/output.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - instances: 5 3 | name: concatenator_z1 4 | properties: 5 | spruce: is cool 6 | this: is a new property added to an existing job 7 | resource_pool: small 8 | - instances: 4 9 | name: oldjob_z1 10 | properties: 11 | this: will show up in the end 12 | resource_pool: small 13 | - instances: 3 14 | name: newjob_z1 15 | properties: 16 | this: is a job defined solely in new.yml 17 | resource_pool: small 18 | -------------------------------------------------------------------------------- /examples/map-replacement/delete.yml: -------------------------------------------------------------------------------- 1 | map_to_replace: ~ 2 | -------------------------------------------------------------------------------- /examples/map-replacement/insert.yml: -------------------------------------------------------------------------------- 1 | map_to_replace: 2 | my: special 3 | data: here 4 | -------------------------------------------------------------------------------- /examples/map-replacement/original.yml: -------------------------------------------------------------------------------- 1 | untouched: 2 | map: stays 3 | the: same 4 | map_to_replace: 5 | has: upstream 6 | data: that 7 | we: do 8 | not: want 9 | -------------------------------------------------------------------------------- /examples/map-replacement/output.yml: -------------------------------------------------------------------------------- 1 | map_to_replace: 2 | my: special 3 | data: here 4 | untouched: 5 | map: stays 6 | the: same 7 | -------------------------------------------------------------------------------- /examples/params/global.yml: -------------------------------------------------------------------------------- 1 | disks: 2 | small: 4096 3 | medium: 8192 4 | large: 102400 5 | networks: (( param "please define the networks" )) 6 | os: 7 | - ubuntu 8 | - centos 9 | - fedora 10 | -------------------------------------------------------------------------------- /examples/params/local.yml: -------------------------------------------------------------------------------- 1 | disks: 2 | medium: 16384 3 | networks: 4 | - name: public 5 | range: 10.40.0.0/24 6 | - name: inside 7 | range: 10.60.0.0/16 8 | -------------------------------------------------------------------------------- /examples/pruning/base.yml: -------------------------------------------------------------------------------- 1 | networks: (( prune )) 2 | 3 | jobs: ~ 4 | -------------------------------------------------------------------------------- /examples/pruning/jobs.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: test 3 | instances: 1 4 | networks: 5 | - test 6 | static_ips: (( static_ips(0) )) 7 | -------------------------------------------------------------------------------- /examples/pruning/networks.yml: -------------------------------------------------------------------------------- 1 | networks: 2 | - name: test 3 | subnets: 4 | - name: private 5 | range: 10.0.0.0/24 6 | gateway: 10.0.0.1 7 | reserved: 8 | - 10.0.0.2 - 10.0.0.49 9 | static: 10 | - 10.0.0.50 - 10.0.0.60 11 | -------------------------------------------------------------------------------- /examples/pruning/output.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: test 3 | instances: 1 4 | networks: 5 | - test 6 | static_ips: 7 | - 10.0.0.50 8 | -------------------------------------------------------------------------------- /examples/static-ips/jobs.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: staticIP_z1 3 | instances: 3 4 | networks: 5 | - name: net1 6 | static_ips: (( static_ips(0, 2, 4) )) 7 | - name: api_z1 8 | instances: 3 9 | networks: 10 | - name: net1 11 | static_ips: (( static_ips(1, 3, 5) )) 12 | -------------------------------------------------------------------------------- /examples/static-ips/networks.yml: -------------------------------------------------------------------------------- 1 | networks: 2 | - name: net1 3 | subnets: 4 | - cloud_properties: random 5 | static: 6 | - 192.168.0.2 - 192.168.0.10 7 | -------------------------------------------------------------------------------- /examples/static-ips/output.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - instances: 3 3 | name: staticIP_z1 4 | networks: 5 | - name: net1 6 | static_ips: 7 | - 192.168.0.2 8 | - 192.168.0.4 9 | - 192.168.0.6 10 | - instances: 3 11 | name: api_z1 12 | networks: 13 | - name: net1 14 | static_ips: 15 | - 192.168.0.3 16 | - 192.168.0.5 17 | - 192.168.0.7 18 | networks: 19 | - name: net1 20 | subnets: 21 | - cloud_properties: random 22 | static: 23 | - 192.168.0.2 - 192.168.0.10 24 | properties: 25 | api_servers: 26 | - 192.168.0.3 27 | - 192.168.0.5 28 | - 192.168.0.7 29 | staticIP_servers: 30 | - 192.168.0.2 31 | - 192.168.0.4 32 | - 192.168.0.6 33 | -------------------------------------------------------------------------------- /examples/static-ips/properties.yml: -------------------------------------------------------------------------------- 1 | properties: 2 | staticIP_servers: (( grab jobs.staticIP_z1.networks.net1.static_ips )) 3 | api_servers: (( grab jobs.api_z1.networks.net1.static_ips )) 4 | -------------------------------------------------------------------------------- /log/log_test.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | . "github.com/smartystreets/goconvey/convey" 8 | ) 9 | 10 | func TestDebug(t *testing.T) { 11 | var stderr string 12 | PrintfStdErr = func(format string, args ...interface{}) { 13 | stderr = fmt.Sprintf(format, args...) 14 | } 15 | Convey("debug", t, func() { 16 | Convey("Outputs when debug is set to true", func() { 17 | stderr = "" 18 | DebugOn = true 19 | DEBUG("test debugging") 20 | So(stderr, ShouldEqual, "DEBUG> test debugging\n") 21 | }) 22 | Convey("Multi-line debug inputs are each prefixed", func() { 23 | stderr = "" 24 | DebugOn = true 25 | DEBUG("test debugging\nsecond line") 26 | So(stderr, ShouldEqual, "DEBUG> test debugging\nDEBUG> second line\n") 27 | }) 28 | Convey("Doesn't output when debug is set to false", func() { 29 | stderr = "" 30 | DebugOn = false 31 | DEBUG("test debugging") 32 | So(stderr, ShouldEqual, "") 33 | }) 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /op_null.go: -------------------------------------------------------------------------------- 1 | package spruce 2 | 3 | import ( 4 | "github.com/starkandwayne/goutils/ansi" 5 | "github.com/starkandwayne/goutils/tree" 6 | ) 7 | 8 | // NullOperator ... 9 | type NullOperator struct { 10 | Missing string 11 | } 12 | 13 | // Setup ... 14 | func (NullOperator) Setup() error { 15 | return nil 16 | } 17 | 18 | // Phase ... 19 | func (NullOperator) Phase() OperatorPhase { 20 | return EvalPhase 21 | } 22 | 23 | // Dependencies ... 24 | func (NullOperator) Dependencies(_ *Evaluator, _ []*Expr, _ []*tree.Cursor, _ []*tree.Cursor) []*tree.Cursor { 25 | return nil 26 | } 27 | 28 | // Run ... 29 | func (n NullOperator) Run(ev *Evaluator, _ []*Expr) (*Response, error) { 30 | return nil, ansi.Errorf("@c{(( %s ))} @R{operator not defined}", n.Missing) 31 | } 32 | -------------------------------------------------------------------------------- /op_param.go: -------------------------------------------------------------------------------- 1 | package spruce 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/starkandwayne/goutils/tree" 7 | ) 8 | 9 | // ParamOperator ... 10 | type ParamOperator struct{} 11 | 12 | // Setup ... 13 | func (ParamOperator) Setup() error { 14 | return nil 15 | } 16 | 17 | // Phase ... 18 | func (ParamOperator) Phase() OperatorPhase { 19 | return ParamPhase 20 | } 21 | 22 | // Dependencies ... 23 | func (ParamOperator) Dependencies(_ *Evaluator, _ []*Expr, _ []*tree.Cursor, _ []*tree.Cursor) []*tree.Cursor { 24 | return nil 25 | } 26 | 27 | // Run ... 28 | func (ParamOperator) Run(ev *Evaluator, args []*Expr) (*Response, error) { 29 | v, _ := args[0].Evaluate(ev.Tree) // FIXME: there are lots of assumptions here... 30 | return nil, fmt.Errorf("%s", v) 31 | } 32 | 33 | func init() { 34 | RegisterOp("param", ParamOperator{}) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | /toml.test 2 | /toml-test 3 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/deprecated.go: -------------------------------------------------------------------------------- 1 | package toml 2 | 3 | import ( 4 | "encoding" 5 | "io" 6 | ) 7 | 8 | // TextMarshaler is an alias for encoding.TextMarshaler. 9 | // 10 | // Deprecated: use encoding.TextMarshaler 11 | type TextMarshaler encoding.TextMarshaler 12 | 13 | // TextUnmarshaler is an alias for encoding.TextUnmarshaler. 14 | // 15 | // Deprecated: use encoding.TextUnmarshaler 16 | type TextUnmarshaler encoding.TextUnmarshaler 17 | 18 | // DecodeReader is an alias for NewDecoder(r).Decode(v). 19 | // 20 | // Deprecated: use NewDecoder(reader).Decode(&value). 21 | func DecodeReader(r io.Reader, v any) (MetaData, error) { return NewDecoder(r).Decode(v) } 22 | 23 | // PrimitiveDecode is an alias for MetaData.PrimitiveDecode(). 24 | // 25 | // Deprecated: use MetaData.PrimitiveDecode. 26 | func PrimitiveDecode(primValue Primitive, v any) error { 27 | md := MetaData{decoded: make(map[string]struct{})} 28 | return md.unify(primValue.undecoded, rvalue(v)) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml implements decoding and encoding of TOML files. 2 | // 3 | // This package supports TOML v1.0.0, as specified at https://toml.io 4 | // 5 | // The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator, 6 | // and can be used to verify if TOML document is valid. It can also be used to 7 | // print the type of each key. 8 | package toml 9 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | coverage.out 25 | 26 | manual_test.go 27 | *.out 28 | *.err 29 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | script: ./test.sh 4 | 5 | go: 6 | - 1.2 7 | - 1.3 8 | - 1.4 9 | - 1.5 10 | - 1.6 11 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | This library was authored by George Lester, and contains contributions from: 2 | 3 | vjeantet (regex support) 4 | iasci (ternary operator) 5 | oxtoacart (parameter structures, deferred parameter retrieval) 6 | wmiller848 (bitwise operators) 7 | prashantv (optimization of bools) 8 | dpaolella (exposure of variables used in an expression) 9 | benpaxton (fix for missing type checks during literal elide process) 10 | abrander (panic-finding testing tool) 11 | xfennec (fix for dates being parsed in the current Location) 12 | bgaifullin (lifting restriction on complex/struct types) -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/ExpressionToken.go: -------------------------------------------------------------------------------- 1 | package govaluate 2 | 3 | /* 4 | Represents a single parsed token. 5 | */ 6 | type ExpressionToken struct { 7 | Kind TokenKind 8 | Value interface{} 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/expressionFunctions.go: -------------------------------------------------------------------------------- 1 | package govaluate 2 | 3 | /* 4 | Represents a function that can be called from within an expression. 5 | This method must return an error if, for any reason, it is unable to produce exactly one unambiguous result. 6 | An error returned will halt execution of the expression. 7 | */ 8 | type ExpressionFunction func(arguments ...interface{}) (interface{}, error) 9 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/lexerStream.go: -------------------------------------------------------------------------------- 1 | package govaluate 2 | 3 | type lexerStream struct { 4 | source []rune 5 | position int 6 | length int 7 | } 8 | 9 | func newLexerStream(source string) *lexerStream { 10 | 11 | var ret *lexerStream 12 | var runes []rune 13 | 14 | for _, character := range source { 15 | runes = append(runes, character) 16 | } 17 | 18 | ret = new(lexerStream) 19 | ret.source = runes 20 | ret.length = len(runes) 21 | return ret 22 | } 23 | 24 | func (this *lexerStream) readCharacter() rune { 25 | 26 | var character rune 27 | 28 | character = this.source[this.position] 29 | this.position += 1 30 | return character 31 | } 32 | 33 | func (this *lexerStream) rewind(amount int) { 34 | this.position -= amount 35 | } 36 | 37 | func (this lexerStream) canRead() bool { 38 | return this.position < this.length 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/parameters.go: -------------------------------------------------------------------------------- 1 | package govaluate 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | /* 8 | Parameters is a collection of named parameters that can be used by an EvaluableExpression to retrieve parameters 9 | when an expression tries to use them. 10 | */ 11 | type Parameters interface { 12 | 13 | /* 14 | Get gets the parameter of the given name, or an error if the parameter is unavailable. 15 | Failure to find the given parameter should be indicated by returning an error. 16 | */ 17 | Get(name string) (interface{}, error) 18 | } 19 | 20 | type MapParameters map[string]interface{} 21 | 22 | func (p MapParameters) Get(name string) (interface{}, error) { 23 | 24 | value, found := p[name] 25 | 26 | if !found { 27 | errorMessage := "No parameter '" + name + "' found." 28 | return nil, errors.New(errorMessage) 29 | } 30 | 31 | return value, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script that runs tests, code coverage, and benchmarks all at once. 4 | # Builds a symlink in /tmp, mostly to avoid messing with GOPATH at the user's shell level. 5 | 6 | TEMPORARY_PATH="/tmp/govaluate_test" 7 | SRC_PATH="${TEMPORARY_PATH}/src" 8 | FULL_PATH="${TEMPORARY_PATH}/src/govaluate" 9 | 10 | # set up temporary directory 11 | rm -rf "${FULL_PATH}" 12 | mkdir -p "${SRC_PATH}" 13 | 14 | ln -s $(pwd) "${FULL_PATH}" 15 | export GOPATH="${TEMPORARY_PATH}" 16 | 17 | pushd "${TEMPORARY_PATH}/src/govaluate" 18 | 19 | # run the actual tests. 20 | export GOVALUATE_TORTURE_TEST="true" 21 | go test -bench=. -benchmem -coverprofile coverage.out 22 | status=$? 23 | 24 | if [ "${status}" != 0 ]; 25 | then 26 | exit $status 27 | fi 28 | 29 | # coverage 30 | go tool cover -func=coverage.out 31 | 32 | popd 33 | -------------------------------------------------------------------------------- /vendor/github.com/Knetic/govaluate/tokenStream.go: -------------------------------------------------------------------------------- 1 | package govaluate 2 | 3 | type tokenStream struct { 4 | tokens []ExpressionToken 5 | index int 6 | tokenLength int 7 | } 8 | 9 | func newTokenStream(tokens []ExpressionToken) *tokenStream { 10 | 11 | var ret *tokenStream 12 | 13 | ret = new(tokenStream) 14 | ret.tokens = tokens 15 | ret.tokenLength = len(tokens) 16 | return ret 17 | } 18 | 19 | func (this *tokenStream) rewind() { 20 | this.index -= 1 21 | } 22 | 23 | func (this *tokenStream) next() ExpressionToken { 24 | 25 | var token ExpressionToken 26 | 27 | token = this.tokens[this.index] 28 | 29 | this.index += 1 30 | return token 31 | } 32 | 33 | func (this tokenStream) hasNext() bool { 34 | 35 | return this.index < this.tokenLength 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // ClientInfo wraps immutable data from the client.Client structure. 4 | type ClientInfo struct { 5 | ServiceName string 6 | ServiceID string 7 | APIVersion string 8 | PartitionID string 9 | Endpoint string 10 | SigningName string 11 | SigningRegion string 12 | JSONVersion string 13 | TargetPrefix string 14 | ResolvedRegion string 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/aws/aws-sdk-go/aws/request" 7 | ) 8 | 9 | // NoOpRetryer provides a retryer that performs no retries. 10 | // It should be used when we do not want retries to be performed. 11 | type NoOpRetryer struct{} 12 | 13 | // MaxRetries returns the number of maximum returns the service will use to make 14 | // an individual API; For NoOpRetryer the MaxRetries will always be zero. 15 | func (d NoOpRetryer) MaxRetries() int { 16 | return 0 17 | } 18 | 19 | // ShouldRetry will always return false for NoOpRetryer, as it should never retry. 20 | func (d NoOpRetryer) ShouldRetry(_ *request.Request) bool { 21 | return false 22 | } 23 | 24 | // RetryRules returns the delay duration before retrying this request again; 25 | // since NoOpRetryer does not retry, RetryRules always returns 0. 26 | func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration { 27 | return 0 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go: -------------------------------------------------------------------------------- 1 | //go:build go1.9 2 | // +build go1.9 3 | 4 | package aws 5 | 6 | import "context" 7 | 8 | // Context is an alias of the Go stdlib's context.Context interface. 9 | // It can be used within the SDK's API operation "WithContext" methods. 10 | // 11 | // See https://golang.org/pkg/context on how to use contexts. 12 | type Context = context.Context 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 2 | // +build !go1.7 3 | 4 | package aws 5 | 6 | import ( 7 | "github.com/aws/aws-sdk-go/internal/context" 8 | ) 9 | 10 | // BackgroundContext returns a context that will never be canceled, has no 11 | // values, and no deadline. This context is used by the SDK to provide 12 | // backwards compatibility with non-context API operations and functionality. 13 | // 14 | // Go 1.6 and before: 15 | // This context function is equivalent to context.Background in the Go stdlib. 16 | // 17 | // Go 1.7 and later: 18 | // The context returned will be the value returned by context.Background() 19 | // 20 | // See https://golang.org/pkg/context for more information on Contexts. 21 | func BackgroundContext() Context { 22 | return context.BackgroundCtx 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go: -------------------------------------------------------------------------------- 1 | //go:build go1.7 2 | // +build go1.7 3 | 4 | package aws 5 | 6 | import "context" 7 | 8 | // BackgroundContext returns a context that will never be canceled, has no 9 | // values, and no deadline. This context is used by the SDK to provide 10 | // backwards compatibility with non-context API operations and functionality. 11 | // 12 | // Go 1.6 and before: 13 | // This context function is equivalent to context.Background in the Go stdlib. 14 | // 15 | // Go 1.7 and later: 16 | // The context returned will be the value returned by context.Background() 17 | // 18 | // See https://golang.org/pkg/context for more information on Contexts. 19 | func BackgroundContext() Context { 20 | return context.Background() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // SleepWithContext will wait for the timer duration to expire, or the context 8 | // is canceled. Which ever happens first. If the context is canceled the Context's 9 | // error will be returned. 10 | // 11 | // Expects Context to always return a non-nil error if the Done channel is closed. 12 | func SleepWithContext(ctx Context, dur time.Duration) error { 13 | t := time.NewTimer(dur) 14 | defer t.Stop() 15 | 16 | select { 17 | case <-t.C: 18 | break 19 | case <-ctx.Done(): 20 | return ctx.Err() 21 | } 22 | 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT 2 | package corehandlers 3 | 4 | const isAwsInternal = "" -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go: -------------------------------------------------------------------------------- 1 | package corehandlers 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | // ValidateParametersHandler is a request handler to validate the input parameters. 6 | // Validating parameters only has meaning if done prior to the request being sent. 7 | var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { 8 | if !r.ParamsFilled() { 9 | return 10 | } 11 | 12 | if v, ok := r.Params.(request.Validator); ok { 13 | if err := v.Validate(); err != nil { 14 | r.Error = err 15 | } 16 | } 17 | }} 18 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 2 | // +build !go1.7 3 | 4 | package credentials 5 | 6 | import ( 7 | "github.com/aws/aws-sdk-go/internal/context" 8 | ) 9 | 10 | // backgroundContext returns a context that will never be canceled, has no 11 | // values, and no deadline. This context is used by the SDK to provide 12 | // backwards compatibility with non-context API operations and functionality. 13 | // 14 | // Go 1.6 and before: 15 | // This context function is equivalent to context.Background in the Go stdlib. 16 | // 17 | // Go 1.7 and later: 18 | // The context returned will be the value returned by context.Background() 19 | // 20 | // See https://golang.org/pkg/context for more information on Contexts. 21 | func backgroundContext() Context { 22 | return context.BackgroundCtx 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go: -------------------------------------------------------------------------------- 1 | //go:build go1.7 2 | // +build go1.7 3 | 4 | package credentials 5 | 6 | import "context" 7 | 8 | // backgroundContext returns a context that will never be canceled, has no 9 | // values, and no deadline. This context is used by the SDK to provide 10 | // backwards compatibility with non-context API operations and functionality. 11 | // 12 | // Go 1.6 and before: 13 | // This context function is equivalent to context.Background in the Go stdlib. 14 | // 15 | // Go 1.7 and later: 16 | // The context returned will be the value returned by context.Background() 17 | // 18 | // See https://golang.org/pkg/context for more information on Contexts. 19 | func backgroundContext() Context { 20 | return context.Background() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go: -------------------------------------------------------------------------------- 1 | //go:build go1.9 2 | // +build go1.9 3 | 4 | package credentials 5 | 6 | import "context" 7 | 8 | // Context is an alias of the Go stdlib's context.Context interface. 9 | // It can be used within the SDK's API operation "WithContext" methods. 10 | // 11 | // This type, aws.Context, and context.Context are equivalent. 12 | // 13 | // See https://golang.org/pkg/context on how to use contexts. 14 | type Context = context.Context 15 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey 3 | aws_secret_access_key = secret 4 | aws_session_token = token 5 | 6 | [no_token] 7 | aws_access_key_id = accessKey 8 | aws_secret_access_key = secret 9 | 10 | [with_colon] 11 | aws_access_key_id: accessKey 12 | aws_secret_access_key: secret 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package ssocreds 5 | 6 | import "os" 7 | 8 | func getHomeDirectory() string { 9 | return os.Getenv("HOME") 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go: -------------------------------------------------------------------------------- 1 | package ssocreds 2 | 3 | import "os" 4 | 5 | func getHomeDirectory() string { 6 | return os.Getenv("USERPROFILE") 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go: -------------------------------------------------------------------------------- 1 | package csm 2 | 3 | type metricException interface { 4 | Exception() string 5 | Message() string 6 | } 7 | 8 | type requestException struct { 9 | exception string 10 | message string 11 | } 12 | 13 | func (e requestException) Exception() string { 14 | return e.exception 15 | } 16 | func (e requestException) Message() string { 17 | return e.message 18 | } 19 | 20 | type awsException struct { 21 | requestException 22 | } 23 | 24 | type sdkException struct { 25 | requestException 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go: -------------------------------------------------------------------------------- 1 | package defaults 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go/internal/shareddefaults" 5 | ) 6 | 7 | // SharedCredentialsFilename returns the SDK's default file path 8 | // for the shared credentials file. 9 | // 10 | // Builds the shared config file path based on the OS's platform. 11 | // 12 | // - Linux/Unix: $HOME/.aws/credentials 13 | // - Windows: %USERPROFILE%\.aws\credentials 14 | func SharedCredentialsFilename() string { 15 | return shareddefaults.SharedCredentialsFilename() 16 | } 17 | 18 | // SharedConfigFilename returns the SDK's default file path for 19 | // the shared config file. 20 | // 21 | // Builds the shared config file path based on the OS's platform. 22 | // 23 | // - Linux/Unix: $HOME/.aws/config 24 | // - Windows: %USERPROFILE%\.aws\config 25 | func SharedConfigFilename() string { 26 | return shareddefaults.SharedConfigFilename() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | var legacyGlobalRegions = map[string]map[string]struct{}{ 4 | "sts": { 5 | "ap-northeast-1": {}, 6 | "ap-south-1": {}, 7 | "ap-southeast-1": {}, 8 | "ap-southeast-2": {}, 9 | "ca-central-1": {}, 10 | "eu-central-1": {}, 11 | "eu-north-1": {}, 12 | "eu-west-1": {}, 13 | "eu-west-2": {}, 14 | "eu-west-3": {}, 15 | "sa-east-1": {}, 16 | "us-east-1": {}, 17 | "us-east-2": {}, 18 | "us-west-1": {}, 19 | "us-west-2": {}, 20 | }, 21 | "s3": { 22 | "us-east-1": {}, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/errors.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import "github.com/aws/aws-sdk-go/aws/awserr" 4 | 5 | var ( 6 | // ErrMissingRegion is an error that is returned if region configuration is 7 | // not found. 8 | ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil) 9 | 10 | // ErrMissingEndpoint is an error that is returned if an endpoint cannot be 11 | // resolved for a service. 12 | ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // JSONValue is a representation of a grab bag type that will be marshaled 4 | // into a json string. This type can be used just like any other map. 5 | // 6 | // Example: 7 | // 8 | // values := aws.JSONValue{ 9 | // "Foo": "Bar", 10 | // } 11 | // values["Baz"] = "Qux" 12 | type JSONValue map[string]interface{} 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | func isErrConnectionReset(err error) bool { 8 | if strings.Contains(err.Error(), "read: connection reset") { 9 | return false 10 | } 11 | 12 | if strings.Contains(err.Error(), "use of closed network connection") || 13 | strings.Contains(err.Error(), "connection reset") || 14 | strings.Contains(err.Error(), "broken pipe") { 15 | return true 16 | } 17 | 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | ) 8 | 9 | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { 10 | req := new(http.Request) 11 | *req = *r 12 | req.URL = &url.URL{} 13 | *req.URL = *r.URL 14 | req.Body = body 15 | 16 | req.Header = http.Header{} 17 | for k, v := range r.Header { 18 | for _, vv := range v { 19 | req.Header.Add(k, vv) 20 | } 21 | } 22 | 23 | return req 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go: -------------------------------------------------------------------------------- 1 | //go:build go1.7 2 | // +build go1.7 3 | 4 | package request 5 | 6 | import "github.com/aws/aws-sdk-go/aws" 7 | 8 | // setContext updates the Request to use the passed in context for cancellation. 9 | // Context will also be used for request retry delay. 10 | // 11 | // Creates shallow copy of the http.Request with the WithContext method. 12 | func setRequestContext(r *Request, ctx aws.Context) { 13 | r.context = ctx 14 | r.HTTPRequest = r.HTTPRequest.WithContext(ctx) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 2 | // +build !go1.7 3 | 4 | package request 5 | 6 | import "github.com/aws/aws-sdk-go/aws" 7 | 8 | // setContext updates the Request to use the passed in context for cancellation. 9 | // Context will also be used for request retry delay. 10 | // 11 | // Creates shallow copy of the http.Request with the WithContext method. 12 | func setRequestContext(r *Request, ctx aws.Context) { 13 | r.context = ctx 14 | r.HTTPRequest.Cancel = ctx.Done() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go: -------------------------------------------------------------------------------- 1 | //go:build go1.13 2 | // +build go1.13 3 | 4 | package session 5 | 6 | import ( 7 | "net" 8 | "net/http" 9 | "time" 10 | ) 11 | 12 | // Transport that should be used when a custom CA bundle is specified with the 13 | // SDK. 14 | func getCustomTransport() *http.Transport { 15 | return &http.Transport{ 16 | Proxy: http.ProxyFromEnvironment, 17 | DialContext: (&net.Dialer{ 18 | Timeout: 30 * time.Second, 19 | KeepAlive: 30 * time.Second, 20 | DualStack: true, 21 | }).DialContext, 22 | ForceAttemptHTTP2: true, 23 | MaxIdleConns: 100, 24 | IdleConnTimeout: 90 * time.Second, 25 | TLSHandshakeTimeout: 10 * time.Second, 26 | ExpectContinueTimeout: 1 * time.Second, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.13 && go1.7 2 | // +build !go1.13,go1.7 3 | 4 | package session 5 | 6 | import ( 7 | "net" 8 | "net/http" 9 | "time" 10 | ) 11 | 12 | // Transport that should be used when a custom CA bundle is specified with the 13 | // SDK. 14 | func getCustomTransport() *http.Transport { 15 | return &http.Transport{ 16 | Proxy: http.ProxyFromEnvironment, 17 | DialContext: (&net.Dialer{ 18 | Timeout: 30 * time.Second, 19 | KeepAlive: 30 * time.Second, 20 | DualStack: true, 21 | }).DialContext, 22 | MaxIdleConns: 100, 23 | IdleConnTimeout: 90 * time.Second, 24 | TLSHandshakeTimeout: 10 * time.Second, 25 | ExpectContinueTimeout: 1 * time.Second, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.6 && go1.5 2 | // +build !go1.6,go1.5 3 | 4 | package session 5 | 6 | import ( 7 | "net" 8 | "net/http" 9 | "time" 10 | ) 11 | 12 | // Transport that should be used when a custom CA bundle is specified with the 13 | // SDK. 14 | func getCustomTransport() *http.Transport { 15 | return &http.Transport{ 16 | Proxy: http.ProxyFromEnvironment, 17 | Dial: (&net.Dialer{ 18 | Timeout: 30 * time.Second, 19 | KeepAlive: 30 * time.Second, 20 | }).Dial, 21 | TLSHandshakeTimeout: 10 * time.Second, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 && go1.6 2 | // +build !go1.7,go1.6 3 | 4 | package session 5 | 6 | import ( 7 | "net" 8 | "net/http" 9 | "time" 10 | ) 11 | 12 | // Transport that should be used when a custom CA bundle is specified with the 13 | // SDK. 14 | func getCustomTransport() *http.Transport { 15 | return &http.Transport{ 16 | Proxy: http.ProxyFromEnvironment, 17 | Dial: (&net.Dialer{ 18 | Timeout: 30 * time.Second, 19 | KeepAlive: 30 * time.Second, 20 | }).Dial, 21 | TLSHandshakeTimeout: 10 * time.Second, 22 | ExpectContinueTimeout: 1 * time.Second, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | // WithUnsignedPayload will enable and set the UnsignedPayload field to 4 | // true of the signer. 5 | func WithUnsignedPayload(v4 *Signer) { 6 | v4.UnsignedPayload = true 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 2 | // +build !go1.7 3 | 4 | package v4 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/aws/aws-sdk-go/aws" 10 | ) 11 | 12 | func requestContext(r *http.Request) aws.Context { 13 | return aws.BackgroundContext() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go: -------------------------------------------------------------------------------- 1 | //go:build go1.7 2 | // +build go1.7 3 | 4 | package v4 5 | 6 | import ( 7 | "net/http" 8 | 9 | "github.com/aws/aws-sdk-go/aws" 10 | ) 11 | 12 | func requestContext(r *http.Request) aws.Context { 13 | return r.Context() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go: -------------------------------------------------------------------------------- 1 | //go:build go1.5 2 | // +build go1.5 3 | 4 | package v4 5 | 6 | import ( 7 | "net/url" 8 | "strings" 9 | ) 10 | 11 | func getURIPath(u *url.URL) string { 12 | var uri string 13 | 14 | if len(u.Opaque) > 0 { 15 | uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") 16 | } else { 17 | uri = u.EscapedPath() 18 | } 19 | 20 | if len(uri) == 0 { 21 | uri = "/" 22 | } 23 | 24 | return uri 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/url.go: -------------------------------------------------------------------------------- 1 | //go:build go1.8 2 | // +build go1.8 3 | 4 | package aws 5 | 6 | import "net/url" 7 | 8 | // URLHostname will extract the Hostname without port from the URL value. 9 | // 10 | // Wrapper of net/url#URL.Hostname for backwards Go version compatibility. 11 | func URLHostname(url *url.URL) string { 12 | return url.Hostname() 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.8 2 | // +build !go1.8 3 | 4 | package aws 5 | 6 | import ( 7 | "net/url" 8 | "strings" 9 | ) 10 | 11 | // URLHostname will extract the Hostname without port from the URL value. 12 | // 13 | // Copy of Go 1.8's net/url#URL.Hostname functionality. 14 | func URLHostname(url *url.URL) string { 15 | return stripPort(url.Host) 16 | 17 | } 18 | 19 | // stripPort is copy of Go 1.8 url#URL.Hostname functionality. 20 | // https://golang.org/src/net/url/url.go 21 | func stripPort(hostport string) string { 22 | colon := strings.IndexByte(hostport, ':') 23 | if colon == -1 { 24 | return hostport 25 | } 26 | if i := strings.IndexByte(hostport, ']'); i != -1 { 27 | return strings.TrimPrefix(hostport[:i], "[") 28 | } 29 | return hostport[:colon] 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.55.5" 9 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | var commaRunes = []rune(",") 4 | 5 | func isComma(b rune) bool { 6 | return b == ',' 7 | } 8 | 9 | func newCommaToken() Token { 10 | return newToken(TokenComma, commaRunes, NoneType) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | // isComment will return whether or not the next byte(s) is a 4 | // comment. 5 | func isComment(b []rune) bool { 6 | if len(b) == 0 { 7 | return false 8 | } 9 | 10 | switch b[0] { 11 | case ';': 12 | return true 13 | case '#': 14 | return true 15 | } 16 | 17 | return false 18 | } 19 | 20 | // newCommentToken will create a comment token and 21 | // return how many bytes were read. 22 | func newCommentToken(b []rune) (Token, int, error) { 23 | i := 0 24 | for ; i < len(b); i++ { 25 | if b[i] == '\n' { 26 | break 27 | } 28 | 29 | if len(b)-i > 2 && b[i] == '\r' && b[i+1] == '\n' { 30 | break 31 | } 32 | } 33 | 34 | return newToken(TokenComment, b[:i], NoneType), i, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | // emptyToken is used to satisfy the Token interface 4 | var emptyToken = newToken(TokenNone, []rune{}, NoneType) 5 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | // newExpression will return an expression AST. 4 | // Expr represents an expression 5 | // 6 | // grammar: 7 | // expr -> string | number 8 | func newExpression(tok Token) AST { 9 | return newASTWithRootToken(ASTKindExpr, tok) 10 | } 11 | 12 | func newEqualExpr(left AST, tok Token) AST { 13 | return newASTWithRootToken(ASTKindEqualExpr, tok, left) 14 | } 15 | 16 | // EqualExprKey will return a LHS value in the equal expr 17 | func EqualExprKey(ast AST) string { 18 | children := ast.GetChildren() 19 | if len(children) == 0 || ast.Kind != ASTKindEqualExpr { 20 | return "" 21 | } 22 | 23 | return string(children[0].Root.Raw()) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go: -------------------------------------------------------------------------------- 1 | //go:build gofuzz 2 | // +build gofuzz 3 | 4 | package ini 5 | 6 | import ( 7 | "bytes" 8 | ) 9 | 10 | func Fuzz(data []byte) int { 11 | b := bytes.NewReader(data) 12 | 13 | if _, err := Parse(b); err != nil { 14 | return 0 15 | } 16 | 17 | return 1 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | func isNewline(b []rune) bool { 4 | if len(b) == 0 { 5 | return false 6 | } 7 | 8 | if b[0] == '\n' { 9 | return true 10 | } 11 | 12 | if len(b) < 2 { 13 | return false 14 | } 15 | 16 | return b[0] == '\r' && b[1] == '\n' 17 | } 18 | 19 | func newNewlineToken(b []rune) (Token, int, error) { 20 | i := 1 21 | if b[0] == '\r' && isNewline(b[1:]) { 22 | i++ 23 | } 24 | 25 | if !isNewline([]rune(b[:i])) { 26 | return emptyToken, 0, NewParseError("invalid new line token") 27 | } 28 | 29 | return newToken(TokenNL, b[:i], NoneType), i, nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | var ( 8 | equalOp = []rune("=") 9 | equalColonOp = []rune(":") 10 | ) 11 | 12 | func isOp(b []rune) bool { 13 | if len(b) == 0 { 14 | return false 15 | } 16 | 17 | switch b[0] { 18 | case '=': 19 | return true 20 | case ':': 21 | return true 22 | default: 23 | return false 24 | } 25 | } 26 | 27 | func newOpToken(b []rune) (Token, int, error) { 28 | tok := Token{} 29 | 30 | switch b[0] { 31 | case '=': 32 | tok = newToken(TokenOp, equalOp, NoneType) 33 | case ':': 34 | tok = newToken(TokenOp, equalColonOp, NoneType) 35 | default: 36 | return tok, 0, NewParseError(fmt.Sprintf("unexpected op type, %v", b[0])) 37 | } 38 | return tok, 1, nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | var ( 8 | emptyRunes = []rune{} 9 | ) 10 | 11 | func isSep(b []rune) bool { 12 | if len(b) == 0 { 13 | return false 14 | } 15 | 16 | switch b[0] { 17 | case '[', ']': 18 | return true 19 | default: 20 | return false 21 | } 22 | } 23 | 24 | var ( 25 | openBrace = []rune("[") 26 | closeBrace = []rune("]") 27 | ) 28 | 29 | func newSepToken(b []rune) (Token, int, error) { 30 | tok := Token{} 31 | 32 | switch b[0] { 33 | case '[': 34 | tok = newToken(TokenSep, openBrace, NoneType) 35 | case ']': 36 | tok = newToken(TokenSep, closeBrace, NoneType) 37 | default: 38 | return tok, 0, NewParseError(fmt.Sprintf("unexpected sep type, %v", b[0])) 39 | } 40 | return tok, 1, nil 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | // Walk will traverse the AST using the v, the Visitor. 4 | func Walk(tree []AST, v Visitor) error { 5 | for _, node := range tree { 6 | switch node.Kind { 7 | case ASTKindExpr, 8 | ASTKindExprStatement: 9 | 10 | if err := v.VisitExpr(node); err != nil { 11 | return err 12 | } 13 | case ASTKindStatement, 14 | ASTKindCompletedSectionStatement, 15 | ASTKindNestedSectionStatement, 16 | ASTKindCompletedNestedSectionStatement: 17 | 18 | if err := v.VisitStatement(node); err != nil { 19 | return err 20 | } 21 | } 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go: -------------------------------------------------------------------------------- 1 | package ini 2 | 3 | import ( 4 | "unicode" 5 | ) 6 | 7 | // isWhitespace will return whether or not the character is 8 | // a whitespace character. 9 | // 10 | // Whitespace is defined as a space or tab. 11 | func isWhitespace(c rune) bool { 12 | return unicode.IsSpace(c) && c != '\n' && c != '\r' 13 | } 14 | 15 | func newWSToken(b []rune) (Token, int, error) { 16 | i := 0 17 | for ; i < len(b); i++ { 18 | if !isWhitespace(b[i]) { 19 | break 20 | } 21 | } 22 | 23 | return newToken(TokenWS, b[:i], NoneType), i, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go: -------------------------------------------------------------------------------- 1 | package sdkio 2 | 3 | const ( 4 | // Byte is 8 bits 5 | Byte int64 = 1 6 | // KibiByte (KiB) is 1024 Bytes 7 | KibiByte = Byte * 1024 8 | // MebiByte (MiB) is 1024 KiB 9 | MebiByte = KibiByte * 1024 10 | // GibiByte (GiB) is 1024 MiB 11 | GibiByte = MebiByte * 1024 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.7 2 | // +build !go1.7 3 | 4 | package sdkio 5 | 6 | // Copy of Go 1.7 io package's Seeker constants. 7 | const ( 8 | SeekStart = 0 // seek relative to the origin of the file 9 | SeekCurrent = 1 // seek relative to the current offset 10 | SeekEnd = 2 // seek relative to the end 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go: -------------------------------------------------------------------------------- 1 | //go:build go1.7 2 | // +build go1.7 3 | 4 | package sdkio 5 | 6 | import "io" 7 | 8 | // Alias for Go 1.7 io package Seeker constants 9 | const ( 10 | SeekStart = io.SeekStart // seek relative to the origin of the file 11 | SeekCurrent = io.SeekCurrent // seek relative to the current offset 12 | SeekEnd = io.SeekEnd // seek relative to the end 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go: -------------------------------------------------------------------------------- 1 | //go:build go1.10 2 | // +build go1.10 3 | 4 | package sdkmath 5 | 6 | import "math" 7 | 8 | // Round returns the nearest integer, rounding half away from zero. 9 | // 10 | // Special cases are: 11 | // Round(±0) = ±0 12 | // Round(±Inf) = ±Inf 13 | // Round(NaN) = NaN 14 | func Round(x float64) float64 { 15 | return math.Round(x) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go: -------------------------------------------------------------------------------- 1 | package sdkrand 2 | 3 | import ( 4 | "math/rand" 5 | "sync" 6 | "time" 7 | ) 8 | 9 | // lockedSource is a thread-safe implementation of rand.Source 10 | type lockedSource struct { 11 | lk sync.Mutex 12 | src rand.Source 13 | } 14 | 15 | func (r *lockedSource) Int63() (n int64) { 16 | r.lk.Lock() 17 | n = r.src.Int63() 18 | r.lk.Unlock() 19 | return 20 | } 21 | 22 | func (r *lockedSource) Seed(seed int64) { 23 | r.lk.Lock() 24 | r.src.Seed(seed) 25 | r.lk.Unlock() 26 | } 27 | 28 | // SeededRand is a new RNG using a thread safe implementation of rand.Source 29 | var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) 30 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go: -------------------------------------------------------------------------------- 1 | //go:build go1.6 2 | // +build go1.6 3 | 4 | package sdkrand 5 | 6 | import "math/rand" 7 | 8 | // Read provides the stub for math.Rand.Read method support for go version's 9 | // 1.6 and greater. 10 | func Read(r *rand.Rand, p []byte) (int, error) { 11 | return r.Read(p) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.6 2 | // +build !go1.6 3 | 4 | package sdkrand 5 | 6 | import "math/rand" 7 | 8 | // Read backfills Go 1.6's math.Rand.Reader for Go 1.5 9 | func Read(r *rand.Rand, p []byte) (n int, err error) { 10 | // Copy of Go standard libraries math package's read function not added to 11 | // standard library until Go 1.6. 12 | var pos int8 13 | var val int64 14 | for n = 0; n < len(p); n++ { 15 | if pos == 0 { 16 | val = r.Int63() 17 | pos = 7 18 | } 19 | p[n] = byte(val) 20 | val >>= 8 21 | pos-- 22 | } 23 | 24 | return n, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go: -------------------------------------------------------------------------------- 1 | package sdkuri 2 | 3 | import ( 4 | "path" 5 | "strings" 6 | ) 7 | 8 | // PathJoin will join the elements of the path delimited by the "/" 9 | // character. Similar to path.Join with the exception the trailing "/" 10 | // character is preserved if present. 11 | func PathJoin(elems ...string) string { 12 | if len(elems) == 0 { 13 | return "" 14 | } 15 | 16 | hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/") 17 | str := path.Join(elems...) 18 | if hasTrailing && str != "/" { 19 | str += "/" 20 | } 21 | 22 | return str 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go: -------------------------------------------------------------------------------- 1 | package shareddefaults 2 | 3 | const ( 4 | // ECSCredsProviderEnvVar is an environmental variable key used to 5 | // determine which path needs to be hit. 6 | ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" 7 | ) 8 | 9 | // ECSContainerCredentialsURI is the endpoint to retrieve container 10 | // credentials. This can be overridden to test to ensure the credential process 11 | // is behaving correctly. 12 | var ECSContainerCredentialsURI = "http://169.254.170.2" 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_resolve_home.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.12 2 | // +build !go1.12 3 | 4 | package shareddefaults 5 | 6 | import ( 7 | "os" 8 | "runtime" 9 | ) 10 | 11 | func userHomeDir() string { 12 | if runtime.GOOS == "windows" { // Windows 13 | return os.Getenv("USERPROFILE") 14 | } 15 | 16 | // *nix 17 | return os.Getenv("HOME") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_resolve_home_go1.12.go: -------------------------------------------------------------------------------- 1 | //go:build go1.12 2 | // +build go1.12 3 | 4 | package shareddefaults 5 | 6 | import ( 7 | "os" 8 | ) 9 | 10 | func userHomeDir() string { 11 | home, _ := os.UserHomeDir() 12 | return home 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go: -------------------------------------------------------------------------------- 1 | package strings 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings, 8 | // under Unicode case-folding. 9 | func HasPrefixFold(s, prefix string) bool { 10 | return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body 11 | var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} 12 | 13 | // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. 14 | func UnmarshalDiscardBody(r *request.Request) { 15 | if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { 16 | return 17 | } 18 | 19 | io.Copy(ioutil.Discard, r.HTTPResponse.Body) 20 | r.HTTPResponse.Body.Close() 21 | } 22 | 23 | // ResponseMetadata provides the SDK response metadata attributes. 24 | type ResponseMetadata struct { 25 | StatusCode int 26 | RequestID string 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go: -------------------------------------------------------------------------------- 1 | package xmlutil 2 | 3 | import ( 4 | "encoding/xml" 5 | "strings" 6 | ) 7 | 8 | type xmlAttrSlice []xml.Attr 9 | 10 | func (x xmlAttrSlice) Len() int { 11 | return len(x) 12 | } 13 | 14 | func (x xmlAttrSlice) Less(i, j int) bool { 15 | spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space 16 | localI, localJ := x[i].Name.Local, x[j].Name.Local 17 | valueI, valueJ := x[i].Value, x[j].Value 18 | 19 | spaceCmp := strings.Compare(spaceI, spaceJ) 20 | localCmp := strings.Compare(localI, localJ) 21 | valueCmp := strings.Compare(valueI, valueJ) 22 | 23 | if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) { 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | 30 | func (x xmlAttrSlice) Swap(i, j int) { 31 | x[i], x[j] = x[j], x[i] 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | func init() { 6 | initRequest = customizeRequest 7 | } 8 | 9 | func customizeRequest(r *request.Request) { 10 | r.RetryErrorCodes = append(r.RetryErrorCodes, ErrCodeIDPCommunicationErrorException) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry-community/vaultkv/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry-community/vaultkv/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | vaultVersions=( 4 | "1.3.6" 5 | "1.4.2" 6 | "1.5.6" 7 | "1.6.4" 8 | "1.7.1" 9 | ) 10 | 11 | if [[ $1 == "latest" ]]; then 12 | vaultVersions=("${vaultVersions[${#vaultVersions[@]} - 1]}") 13 | fi 14 | 15 | for version in "${vaultVersions[@]}"; do 16 | ginkgo -noisySkippings=false -p -cover -coverprofile "vaultkv${version}.coverprofile" -- -v="$version" 17 | done 18 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/array_index.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type ArrayIndex struct { 8 | Index int 9 | Modifiers []Modifier 10 | Array []interface{} 11 | Path Pointer 12 | } 13 | 14 | func (i ArrayIndex) Concrete() (int, error) { 15 | result := i.Index 16 | 17 | for _, modifier := range i.Modifiers { 18 | switch modifier.(type) { 19 | case PrevModifier: 20 | result -= 1 21 | case NextModifier: 22 | result += 1 23 | default: 24 | return 0, fmt.Errorf("Expected to find one of the following modifiers: 'prev', 'next', but found modifier '%T'", modifier) 25 | } 26 | } 27 | 28 | if result >= len(i.Array) || (-result)-1 >= len(i.Array) { 29 | return 0, OpMissingIndexErr{result, i.Array, i.Path} 30 | } 31 | 32 | if result < 0 { 33 | result = len(i.Array) + result 34 | } 35 | 36 | return result, nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/descriptive_op.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type DescriptiveOp struct { 8 | Op Op 9 | ErrorMsg string 10 | } 11 | 12 | func (op DescriptiveOp) Apply(doc interface{}) (interface{}, error) { 13 | doc, err := op.Op.Apply(doc) 14 | if err != nil { 15 | return nil, fmt.Errorf("Error '%s': %s", op.ErrorMsg, err.Error()) 16 | } 17 | return doc, nil 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/err_op.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type ErrOp struct { 4 | Err error 5 | } 6 | 7 | func (op ErrOp) Apply(_ interface{}) (interface{}, error) { 8 | return nil, op.Err 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/ops.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type Ops []Op 4 | 5 | type Op interface { 6 | Apply(interface{}) (interface{}, error) 7 | } 8 | 9 | // Ensure basic operations implement Op 10 | var _ Op = Ops{} 11 | var _ Op = ReplaceOp{} 12 | var _ Op = RemoveOp{} 13 | var _ Op = FindOp{} 14 | var _ Op = DescriptiveOp{} 15 | var _ Op = ErrOp{} 16 | 17 | func (ops Ops) Apply(doc interface{}) (interface{}, error) { 18 | var err error 19 | 20 | for _, op := range ops { 21 | doc, err = op.Apply(doc) 22 | if err != nil { 23 | return nil, err 24 | } 25 | } 26 | 27 | return doc, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/tokens.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type Token interface { 4 | _token() 5 | } 6 | 7 | type RootToken struct{} 8 | 9 | type IndexToken struct { 10 | Index int 11 | Modifiers []Modifier 12 | } 13 | 14 | type AfterLastIndexToken struct{} 15 | 16 | type MatchingIndexToken struct { 17 | Key string 18 | Value string 19 | Optional bool 20 | Modifiers []Modifier 21 | } 22 | 23 | type KeyToken struct { 24 | Key string 25 | Optional bool 26 | } 27 | 28 | type Modifier interface { 29 | _modifier() 30 | } 31 | 32 | type PrevModifier struct{} 33 | type NextModifier struct{} 34 | 35 | type BeforeModifier struct{} 36 | type AfterModifier struct{} 37 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/tokens_impl.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | var _ Token = RootToken{} 4 | var _ Token = IndexToken{} 5 | var _ Token = AfterLastIndexToken{} 6 | var _ Token = MatchingIndexToken{} 7 | var _ Token = KeyToken{} 8 | 9 | func (RootToken) _token() {} 10 | func (IndexToken) _token() {} 11 | func (AfterLastIndexToken) _token() {} 12 | func (MatchingIndexToken) _token() {} 13 | func (KeyToken) _token() {} 14 | 15 | var _ Modifier = PrevModifier{} 16 | var _ Modifier = NextModifier{} 17 | var _ Modifier = BeforeModifier{} 18 | var _ Modifier = AfterModifier{} 19 | 20 | func (PrevModifier) _modifier() {} 21 | func (NextModifier) _modifier() {} 22 | func (BeforeModifier) _modifier() {} 23 | func (AfterModifier) _modifier() {} 24 | -------------------------------------------------------------------------------- /vendor/github.com/geofffranks/yaml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | 9 | go_import_path: gopkg.in/yaml.v2 10 | -------------------------------------------------------------------------------- /vendor/github.com/geofffranks/yaml/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/bunt/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/bunt/.grenrc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dataSource: "commits" 3 | prefix: "bunt release " 4 | includeMessages: "commits" 5 | changelogFilename: "CHANGELOG.md" 6 | template: 7 | commit: "{{url}} {{message}}" 8 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/bunt/README.md: -------------------------------------------------------------------------------- 1 | # bunt 2 | 3 | [![License](https://img.shields.io/github/license/gonvenience/bunt.svg)](https://github.com/gonvenience/bunt/blob/main/LICENSE) 4 | [![Go Report Card](https://goreportcard.com/badge/github.com/gonvenience/bunt)](https://goreportcard.com/report/github.com/gonvenience/bunt) 5 | [![Tests](https://github.com/gonvenience/bunt/workflows/Tests/badge.svg)](https://github.com/gonvenience/bunt/actions?query=workflow%3A%22Tests%22) 6 | [![Codecov](https://img.shields.io/codecov/c/github/gonvenience/bunt/main.svg)](https://codecov.io/gh/gonvenience/bunt) 7 | [![PkgGoDev](https://pkg.go.dev/badge/github.com/gonvenience/bunt)](https://pkg.go.dev/github.com/gonvenience/bunt) 8 | [![Release](https://img.shields.io/github/release/gonvenience/bunt.svg)](https://github.com/gonvenience/bunt/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gonvenience/bunt) 9 | 10 | Golang package for creating true color output in terminals 11 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/neat/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/term/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/text/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/text/README.md: -------------------------------------------------------------------------------- 1 | # text [![License](https://img.shields.io/github/license/gonvenience/text.svg)](https://github.com/gonvenience/text/blob/main/LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/gonvenience/text)](https://goreportcard.com/report/github.com/gonvenience/text) [![Build and Tests](https://github.com/gonvenience/text/workflows/Build%20and%20Tests/badge.svg)](https://github.com/gonvenience/text/actions?query=workflow%3A%22Build+and+Tests%22) [![Codecov](https://img.shields.io/codecov/c/github/gonvenience/text/main.svg)](https://codecov.io/gh/gonvenience/text) [![PkgGoDev](https://pkg.go.dev/badge/github.com/gonvenience/text)](https://pkg.go.dev/github.com/gonvenience/text) [![Release](https://img.shields.io/github/release/gonvenience/text.svg)](https://github.com/gonvenience/text/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gonvenience/text) 2 | 3 | Golang package with convenience functions for strings 4 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/wrap/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/wrap/README.md: -------------------------------------------------------------------------------- 1 | # wrap 2 | 3 | [![License](https://img.shields.io/github/license/gonvenience/wrap.svg)](https://github.com/gonvenience/wrap/blob/main/LICENSE) 4 | [![Go Report Card](https://goreportcard.com/badge/github.com/gonvenience/wrap)](https://goreportcard.com/report/github.com/gonvenience/wrap) 5 | [![Tests](https://github.com/gonvenience/wrap/workflows/Tests/badge.svg)](https://github.com/gonvenience/wrap/actions?query=workflow%3A%22Tests%22) 6 | [![Codecov](https://img.shields.io/codecov/c/github/gonvenience/wrap/main.svg)](https://codecov.io/gh/gonvenience/wrap) 7 | [![PkgGoDev](https://pkg.go.dev/badge/github.com/gonvenience/wrap)](https://pkg.go.dev/github.com/gonvenience/wrap) 8 | [![Release](https://img.shields.io/github/release/gonvenience/wrap.svg)](https://github.com/gonvenience/wrap/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gonvenience/wrap) 9 | 10 | Golang package to wrap things into a bit of context 11 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/ytbx/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | -------------------------------------------------------------------------------- /vendor/github.com/gonvenience/ytbx/.grenrc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dataSource: "commits" 3 | prefix: "ytbx release " 4 | includeMessages: "commits" 5 | changelogFilename: "CHANGELOG.md" 6 | template: 7 | commit: "{{url}} {{message}}" 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | # test runs the test suite and vets the code. 6 | test: generate 7 | @echo "==> Running tests..." 8 | @go list $(TEST) \ 9 | | grep -v "/vendor/" \ 10 | | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} 11 | 12 | # testrace runs the race checker 13 | testrace: generate 14 | @echo "==> Running tests (race)..." 15 | @go list $(TEST) \ 16 | | grep -v "/vendor/" \ 17 | | xargs -n1 go test -timeout=60s -race ${TESTARGS} 18 | 19 | # updatedeps installs all the dependencies needed to run and build. 20 | updatedeps: 21 | @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" 22 | 23 | # generate runs `go generate` to build the dynamically generated source files. 24 | generate: 25 | @echo "==> Generating..." 26 | @find . -type f -name '.DS_Store' -delete 27 | @go list ./... \ 28 | | grep -v "/vendor/" \ 29 | | xargs -n1 go generate 30 | 31 | .PHONY: default test testrace updatedeps generate 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/flatten.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Flatten flattens the given error, merging any *Errors together into 4 | // a single *Error. 5 | func Flatten(err error) error { 6 | // If it isn't an *Error, just return the error as-is 7 | if _, ok := err.(*Error); !ok { 8 | return err 9 | } 10 | 11 | // Otherwise, make the result and flatten away! 12 | flatErr := new(Error) 13 | flatten(err, flatErr) 14 | return flatErr 15 | } 16 | 17 | func flatten(err error, flatErr *Error) { 18 | switch err := err.(type) { 19 | case *Error: 20 | for _, e := range err.Errors { 21 | flatten(e, flatErr) 22 | } 23 | default: 24 | flatErr.Errors = append(flatErr.Errors, err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/format.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // ErrorFormatFunc is a function callback that is called by Error to 9 | // turn the list of errors into a string. 10 | type ErrorFormatFunc func([]error) string 11 | 12 | // ListFormatFunc is a basic formatter that outputs the number of errors 13 | // that occurred along with a bullet point list of the errors. 14 | func ListFormatFunc(es []error) string { 15 | if len(es) == 1 { 16 | return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) 17 | } 18 | 19 | points := make([]string, len(es)) 20 | for i, err := range es { 21 | points[i] = fmt.Sprintf("* %s", err) 22 | } 23 | 24 | return fmt.Sprintf( 25 | "%d errors occurred:\n\t%s\n\n", 26 | len(es), strings.Join(points, "\n\t")) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/group.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import "sync" 4 | 5 | // Group is a collection of goroutines which return errors that need to be 6 | // coalesced. 7 | type Group struct { 8 | mutex sync.Mutex 9 | err *Error 10 | wg sync.WaitGroup 11 | } 12 | 13 | // Go calls the given function in a new goroutine. 14 | // 15 | // If the function returns an error it is added to the group multierror which 16 | // is returned by Wait. 17 | func (g *Group) Go(f func() error) { 18 | g.wg.Add(1) 19 | 20 | go func() { 21 | defer g.wg.Done() 22 | 23 | if err := f(); err != nil { 24 | g.mutex.Lock() 25 | g.err = Append(g.err, err) 26 | g.mutex.Unlock() 27 | } 28 | }() 29 | } 30 | 31 | // Wait blocks until all function calls from the Go method have returned, then 32 | // returns the multierror. 33 | func (g *Group) Wait() *Error { 34 | g.wg.Wait() 35 | g.mutex.Lock() 36 | defer g.mutex.Unlock() 37 | return g.err 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/prefix.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/errwrap" 7 | ) 8 | 9 | // Prefix is a helper function that will prefix some text 10 | // to the given error. If the error is a multierror.Error, then 11 | // it will be prefixed to each wrapped error. 12 | // 13 | // This is useful to use when appending multiple multierrors 14 | // together in order to give better scoping. 15 | func Prefix(err error, prefix string) error { 16 | if err == nil { 17 | return nil 18 | } 19 | 20 | format := fmt.Sprintf("%s {{err}}", prefix) 21 | switch err := err.(type) { 22 | case *Error: 23 | // Typed nils can reach here, so initialize if we are nil 24 | if err == nil { 25 | err = new(Error) 26 | } 27 | 28 | // Wrap each of the errors 29 | for i, e := range err.Errors { 30 | err.Errors[i] = errwrap.Wrapf(format, e) 31 | } 32 | 33 | return err 34 | default: 35 | return errwrap.Wrapf(format, err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/sort.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Len implements sort.Interface function for length 4 | func (err Error) Len() int { 5 | return len(err.Errors) 6 | } 7 | 8 | // Swap implements sort.Interface function for swapping elements 9 | func (err Error) Swap(i, j int) { 10 | err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] 11 | } 12 | 13 | // Less implements sort.Interface function for determining order 14 | func (err Error) Less(i, j int) bool { 15 | return err.Errors[i].Error() < err.Errors[j].Error() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | 11 | script: 12 | - go test -bench . -benchmem -v ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/README.md: -------------------------------------------------------------------------------- 1 | # uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) 2 | 3 | Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. 4 | 5 | Documentation 6 | ============= 7 | 8 | The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-uuid). 9 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | /jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.5.x 7 | - 1.6.x 8 | - 1.7.x 9 | - 1.8.x 10 | - 1.9.x 11 | - 1.10.x 12 | - 1.11.x 13 | - 1.12.x 14 | - 1.13.x 15 | - 1.14.x 16 | - 1.15.x 17 | - tip 18 | 19 | allow_failures: 20 | - go: tip 21 | 22 | script: make build 23 | 24 | matrix: 25 | include: 26 | - language: go 27 | go: 1.15.x 28 | script: make test 29 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 James Saryerwinnie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/astnodetype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type astNodeType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" 8 | 9 | var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} 10 | 11 | func (i astNodeType) String() string { 12 | if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { 13 | return fmt.Sprintf("astNodeType(%d)", i) 14 | } 15 | return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/toktype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=tokType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" 8 | 9 | var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} 10 | 11 | func (i tokType) String() string { 12 | if i < 0 || i >= tokType(len(_tokType_index)-1) { 13 | return fmt.Sprintf("tokType(%d)", i) 14 | } 15 | return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/jtolds/gls/gen_sym.go: -------------------------------------------------------------------------------- 1 | package gls 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | keyMtx sync.Mutex 9 | keyCounter uint64 10 | ) 11 | 12 | // ContextKey is a throwaway value you can use as a key to a ContextManager 13 | type ContextKey struct{ id uint64 } 14 | 15 | // GenSym will return a brand new, never-before-used ContextKey 16 | func GenSym() ContextKey { 17 | keyMtx.Lock() 18 | defer keyMtx.Unlock() 19 | keyCounter += 1 20 | return ContextKey{id: keyCounter} 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/jtolds/gls/gid.go: -------------------------------------------------------------------------------- 1 | package gls 2 | 3 | var ( 4 | stackTagPool = &idPool{} 5 | ) 6 | 7 | // Will return this goroutine's identifier if set. If you always need a 8 | // goroutine identifier, you should use EnsureGoroutineId which will make one 9 | // if there isn't one already. 10 | func GetGoroutineId() (gid uint, ok bool) { 11 | return readStackTag() 12 | } 13 | 14 | // Will call cb with the current goroutine identifier. If one hasn't already 15 | // been generated, one will be created and set first. The goroutine identifier 16 | // might be invalid after cb returns. 17 | func EnsureGoroutineId(cb func(gid uint)) { 18 | if gid, ok := readStackTag(); ok { 19 | cb(gid) 20 | return 21 | } 22 | gid := stackTagPool.Acquire() 23 | defer stackTagPool.Release(gid) 24 | addStackTag(gid, func() { cb(gid) }) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/jtolds/gls/id_pool.go: -------------------------------------------------------------------------------- 1 | package gls 2 | 3 | // though this could probably be better at keeping ids smaller, the goal of 4 | // this class is to keep a registry of the smallest unique integer ids 5 | // per-process possible 6 | 7 | import ( 8 | "sync" 9 | ) 10 | 11 | type idPool struct { 12 | mtx sync.Mutex 13 | released []uint 14 | max_id uint 15 | } 16 | 17 | func (p *idPool) Acquire() (id uint) { 18 | p.mtx.Lock() 19 | defer p.mtx.Unlock() 20 | if len(p.released) > 0 { 21 | id = p.released[len(p.released)-1] 22 | p.released = p.released[:len(p.released)-1] 23 | return id 24 | } 25 | id = p.max_id 26 | p.max_id++ 27 | return id 28 | } 29 | 30 | func (p *idPool) Release(id uint) { 31 | p.mtx.Lock() 32 | defer p.mtx.Unlock() 33 | p.released = append(p.released, id) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/jtolds/gls/stack_tags_main.go: -------------------------------------------------------------------------------- 1 | // +build !js 2 | 3 | package gls 4 | 5 | // This file is used for standard Go builds, which have the expected runtime 6 | // support 7 | 8 | import ( 9 | "runtime" 10 | ) 11 | 12 | var ( 13 | findPtr = func() uintptr { 14 | var pc [1]uintptr 15 | n := runtime.Callers(4, pc[:]) 16 | if n != 1 { 17 | panic("failed to find function pointer") 18 | } 19 | return pc[0] 20 | } 21 | 22 | getStack = func(offset, amount int) (stack []uintptr, next_offset int) { 23 | stack = make([]uintptr, amount) 24 | stack = stack[:runtime.Callers(offset, stack)] 25 | if len(stack) < amount { 26 | return stack, 0 27 | } 28 | return stack, offset + len(stack) 29 | } 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastHappyPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0; i < colorsCount; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.8+rand.Float64()*0.2, 0.65+rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func HappyPalette(colorsCount int) ([]Color, error) { 20 | pimpy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.3 <= c && 0.4 <= l && l <= 0.8 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{pimpy, 50, true}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/warm_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastWarmPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0; i < colorsCount; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.55+rand.Float64()*0.2, 0.35+rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func WarmPalette(colorsCount int) ([]Color, error) { 20 | warmy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.1 <= c && c <= 0.4 && 0.2 <= l && l <= 0.5 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{warmy, 50, true}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-ciede2000/README.md: -------------------------------------------------------------------------------- 1 | # go-ciede2000 2 | 3 | Go implementation of the CIE Delta E 2000 Color-Difference algorithm (CIEDE2000). 4 | 5 | This is a golang port of https://github.com/gfiumara/CIEDE2000 6 | 7 | ## Usage 8 | 9 | ```go 10 | c1 := &color.RGBA{200, 255, 0, 255} 11 | c2 := &color.RGBA{50, 60, 255, 255} 12 | diff := Diff(c1, c2) 13 | ``` 14 | 15 | ## Installation 16 | 17 | ``` 18 | $ go get github.com/mattn/go-ciede2000 19 | ``` 20 | 21 | ## License 22 | 23 | MIT 24 | 25 | ## Author 26 | 27 | Yasuhiro Matsumoto (a.k.a. mattn) 28 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo 2 | // +build darwin freebsd openbsd netbsd dragonfly hurd 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build (appengine || js || nacl || tinygo || wasm) && !windows 2 | // +build appengine js nacl tinygo wasm 3 | // +build !windows 4 | 5 | package isatty 6 | 7 | // IsTerminal returns true if the file descriptor is terminal which 8 | // is always false on js and appengine classic which is a sandboxed PaaS. 9 | func IsTerminal(fd uintptr) bool { 10 | return false 11 | } 12 | 13 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 14 | // terminal. This is also always false on this environment. 15 | func IsCygwinTerminal(fd uintptr) bool { 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) 14 | return err == nil 15 | } 16 | 17 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 18 | // terminal. This is also always false on this environment. 19 | func IsCygwinTerminal(fd uintptr) bool { 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine && !tinygo 2 | // +build linux aix zos 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-ps/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-ps/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2.1 5 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-ps/process_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package ps 4 | 5 | import ( 6 | "fmt" 7 | "io/ioutil" 8 | "strings" 9 | ) 10 | 11 | // Refresh reloads all the data associated with this process. 12 | func (p *UnixProcess) Refresh() error { 13 | statPath := fmt.Sprintf("/proc/%d/stat", p.pid) 14 | dataBytes, err := ioutil.ReadFile(statPath) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | // First, parse out the image name 20 | data := string(dataBytes) 21 | binStart := strings.IndexRune(data, '(') + 1 22 | binEnd := strings.IndexRune(data[binStart:], ')') 23 | p.binary = data[binStart : binStart+binEnd] 24 | 25 | // Move past the image name and start parsing the rest 26 | data = data[binStart+binEnd+2:] 27 | _, err = fmt.Sscanf(data, 28 | "%c %d %d %d", 29 | &p.state, 30 | &p.ppid, 31 | &p.pgrp, 32 | &p.sid) 33 | 34 | return err 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/hashstructure/include.go: -------------------------------------------------------------------------------- 1 | package hashstructure 2 | 3 | // Includable is an interface that can optionally be implemented by 4 | // a struct. It will be called for each field in the struct to check whether 5 | // it should be included in the hash. 6 | type Includable interface { 7 | HashInclude(field string, v interface{}) (bool, error) 8 | } 9 | 10 | // IncludableMap is an interface that can optionally be implemented by 11 | // a struct. It will be called when a map-type field is found to ask the 12 | // struct if the map item should be included in the hash. 13 | type IncludableMap interface { 14 | HashIncludeMap(field string, k, v interface{}) (bool, error) 15 | } 16 | 17 | // Hashable is an interface that can optionally be implemented by a struct 18 | // to override the hash value. This value will override the hash value for 19 | // the entire struct. Entries in the struct will not be hashed. 20 | type Hashable interface { 21 | Hash() (uint64, error) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved. 2 | // https://github.com/sergi/go-diff 3 | // See the included LICENSE file for license details. 4 | // 5 | // go-diff is a Go implementation of Google's Diff, Match, and Patch library 6 | // Original library is Copyright (c) 2006 Google Inc. 7 | // http://code.google.com/p/google-diff-match-patch/ 8 | 9 | package diffmatchpatch 10 | 11 | func min(x, y int) int { 12 | if x < y { 13 | return x 14 | } 15 | return y 16 | } 17 | 18 | func max(x, y int) int { 19 | if x > y { 20 | return x 21 | } 22 | return y 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Operation -trimprefix=Diff"; DO NOT EDIT. 2 | 3 | package diffmatchpatch 4 | 5 | import "fmt" 6 | 7 | const _Operation_name = "DeleteEqualInsert" 8 | 9 | var _Operation_index = [...]uint8{0, 6, 11, 17} 10 | 11 | func (i Operation) String() string { 12 | i -= -1 13 | if i < 0 || i >= Operation(len(_Operation_index)-1) { 14 | return fmt.Sprintf("Operation(%d)", i+-1) 15 | } 16 | return _Operation_name[_Operation_index[i]:_Operation_index[i+1]] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /coverage.* 3 | .DS_Store 4 | *.iml 5 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: bionic 2 | 3 | language: go 4 | 5 | go: 6 | - 1.x 7 | 8 | env: 9 | - GO111MODULE=on 10 | 11 | script: 12 | - make build 13 | 14 | after_success: 15 | - bash <(curl -s https://codecov.io/bash) 16 | 17 | git: 18 | depth: 1 19 | 20 | cache: 21 | directories: 22 | - $HOME/.cache/go-build 23 | - $HOME/gopath/pkg/mod 24 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | test: fmt 4 | GORACE="atexit_sleep_ms=50" go test -timeout=1s -race -cover -short -count=1 ./... 5 | 6 | fmt: 7 | go mod tidy && go fmt ./... 8 | 9 | compile: 10 | go build ./... 11 | 12 | build: test compile 13 | 14 | .PHONY: test compile build 15 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/README.md: -------------------------------------------------------------------------------- 1 | #### SMARTY DISCLAIMER: Subject to the terms of the associated license agreement, this software is freely available for your use. This software is FREE, AS IN PUPPIES, and is a gift. Enjoy your new responsibility. This means that while we may consider enhancement requests, we may or may not choose to entertain requests at our sole and absolute discretion. 2 | 3 | [![Build Status](https://travis-ci.org/smarty/assertions.svg?branch=master)](https://travis-ci.org/smarty/assertions) 4 | [![Code Coverage](https://codecov.io/gh/smarty/assertions/branch/master/graph/badge.svg)](https://codecov.io/gh/smarty/assertions) 5 | [![Go Report Card](https://goreportcard.com/badge/github.com/smarty/assertions)](https://goreportcard.com/report/github.com/smarty/assertions) 6 | [![GoDoc](https://godoc.org/github.com/smarty/assertions?status.svg)](http://godoc.org/github.com/smarty/assertions) 7 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/filter.go: -------------------------------------------------------------------------------- 1 | package assertions 2 | 3 | import "fmt" 4 | 5 | const ( 6 | success = "" 7 | needExactValues = "This assertion requires exactly %d comparison values (you provided %d)." 8 | needNonEmptyCollection = "This assertion requires at least 1 comparison value (you provided 0)." 9 | needFewerValues = "This assertion allows %d or fewer comparison values (you provided %d)." 10 | ) 11 | 12 | func need(needed int, expected []any) string { 13 | if len(expected) != needed { 14 | return fmt.Sprintf(needExactValues, needed, len(expected)) 15 | } 16 | return success 17 | } 18 | 19 | func atLeast(minimum int, expected []any) string { 20 | if len(expected) < minimum { 21 | return needNonEmptyCollection 22 | } 23 | return success 24 | } 25 | 26 | func atMost(max int, expected []any) string { 27 | if len(expected) > max { 28 | return fmt.Sprintf(needFewerValues, max, len(expected)) 29 | } 30 | return success 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/internal/go-diff/diffmatchpatch/mathutil.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved. 2 | // https://github.com/sergi/go-diff 3 | // See the included LICENSE file for license details. 4 | // 5 | // go-diff is a Go implementation of Google's Diff, Match, and Patch library 6 | // Original library is Copyright (c) 2006 Google Inc. 7 | // http://code.google.com/p/google-diff-match-patch/ 8 | 9 | package diffmatchpatch 10 | 11 | func min(x, y int) int { 12 | if x < y { 13 | return x 14 | } 15 | return y 16 | } 17 | 18 | func max(x, y int) int { 19 | if x > y { 20 | return x 21 | } 22 | return y 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/internal/go-diff/diffmatchpatch/operation_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Operation -trimprefix=Diff"; DO NOT EDIT. 2 | 3 | package diffmatchpatch 4 | 5 | import "fmt" 6 | 7 | const _Operation_name = "DeleteEqualInsert" 8 | 9 | var _Operation_index = [...]uint8{0, 6, 11, 17} 10 | 11 | func (i Operation) String() string { 12 | i -= -1 13 | if i < 0 || i >= Operation(len(_Operation_index)-1) { 14 | return fmt.Sprintf("Operation(%d)", i+-1) 15 | } 16 | return _Operation_name[_Operation_index[i]:_Operation_index[i+1]] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/internal/go-render/render/render_time.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "reflect" 5 | "time" 6 | ) 7 | 8 | func renderTime(value reflect.Value) (string, bool) { 9 | if instant, ok := convertTime(value); !ok { 10 | return "", false 11 | } else if instant.IsZero() { 12 | return "0", true 13 | } else { 14 | return instant.String(), true 15 | } 16 | } 17 | 18 | func convertTime(value reflect.Value) (t time.Time, ok bool) { 19 | if value.Type() == timeType { 20 | defer func() { recover() }() 21 | t, ok = value.Interface().(time.Time) 22 | } 23 | return 24 | } 25 | 26 | var timeType = reflect.TypeOf(time.Time{}) 27 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/internal/oglematchers/.gitignore: -------------------------------------------------------------------------------- 1 | *.6 2 | 6.out 3 | _obj/ 4 | _test/ 5 | _testmain.go 6 | -------------------------------------------------------------------------------- /vendor/github.com/smarty/assertions/internal/oglematchers/.travis.yml: -------------------------------------------------------------------------------- 1 | # Cf. http://docs.travis-ci.com/user/getting-started/ 2 | # Cf. http://docs.travis-ci.com/user/languages/go/ 3 | 4 | language: go 5 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/convey.goconvey: -------------------------------------------------------------------------------- 1 | #ignore 2 | -timeout=1s 3 | #-covermode=count 4 | #-coverpkg=github.com/smartystreets/goconvey/convey,github.com/smartystreets/goconvey/convey/gotest,github.com/smartystreets/goconvey/convey/reporting -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/nilReporter.go: -------------------------------------------------------------------------------- 1 | package convey 2 | 3 | import ( 4 | "github.com/smartystreets/goconvey/convey/reporting" 5 | ) 6 | 7 | type nilReporter struct{} 8 | 9 | func (self *nilReporter) BeginStory(story *reporting.StoryReport) {} 10 | func (self *nilReporter) Enter(scope *reporting.ScopeReport) {} 11 | func (self *nilReporter) Report(report *reporting.AssertionResult) {} 12 | func (self *nilReporter) Exit() {} 13 | func (self *nilReporter) EndStory() {} 14 | func (self *nilReporter) Write(p []byte) (int, error) { return len(p), nil } 15 | func newNilReporter() *nilReporter { return &nilReporter{} } 16 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/reporting/console.go: -------------------------------------------------------------------------------- 1 | package reporting 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | type console struct{} 9 | 10 | func (self *console) Write(p []byte) (n int, err error) { 11 | return fmt.Print(string(p)) 12 | } 13 | 14 | func NewConsole() io.Writer { 15 | return new(console) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/reporting/doc.go: -------------------------------------------------------------------------------- 1 | // Package reporting contains internal functionality related 2 | // to console reporting and output. Although this package has 3 | // exported names is not intended for public consumption. See the 4 | // examples package for how to use this project. 5 | package reporting 6 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go: -------------------------------------------------------------------------------- 1 | package reporting 2 | 3 | type gotestReporter struct{ test T } 4 | 5 | func (self *gotestReporter) BeginStory(story *StoryReport) { 6 | self.test = story.Test 7 | } 8 | 9 | func (self *gotestReporter) Enter(scope *ScopeReport) {} 10 | 11 | func (self *gotestReporter) Report(r *AssertionResult) { 12 | if !passed(r) { 13 | self.test.Fail() 14 | } 15 | } 16 | 17 | func (self *gotestReporter) Exit() {} 18 | 19 | func (self *gotestReporter) EndStory() { 20 | self.test = nil 21 | } 22 | 23 | func (self *gotestReporter) Write(content []byte) (written int, err error) { 24 | return len(content), nil // no-op 25 | } 26 | 27 | func NewGoTestReporter() *gotestReporter { 28 | return new(gotestReporter) 29 | } 30 | 31 | func passed(r *AssertionResult) bool { 32 | return r.Error == nil && r.Failure == "" 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/reporting/reporting.goconvey: -------------------------------------------------------------------------------- 1 | #ignore 2 | -timeout=1s 3 | -------------------------------------------------------------------------------- /vendor/github.com/smartystreets/goconvey/convey/update_assertions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$(dirname $(realpath $0))" 4 | 5 | ASSERTIONS=($( 6 | go tool nm "$(go list -export -f '{{.Export}}' github.com/smarty/assertions)" |\ 7 | awk '/ T github\.com\/smarty\/assertions\.Should/{split($3, a, "."); print a[3]}' |\ 8 | sort | uniq)) 9 | 10 | ( 11 | echo "package convey" 12 | echo 13 | echo "// DO NOT EDIT: generated by update_assertions.sh" 14 | echo 15 | echo "//go:generate ./update_assertions.sh" 16 | echo 17 | echo "import \"github.com/smarty/assertions\"" 18 | echo 19 | echo "// These assertions are forwarded from github.com/smarty/assertions" 20 | echo "// in order to make convey self-contained." 21 | echo "var (" 22 | 23 | for assertion in "${ASSERTIONS[@]}" 24 | do 25 | echo " $assertion = assertions.$assertion" 26 | done 27 | 28 | echo ")" 29 | ) > ./assertions.go 30 | 31 | go fmt ./assertions.go 32 | -------------------------------------------------------------------------------- /vendor/github.com/voxelbrain/goptions/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /vendor/github.com/voxelbrain/goptions/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | Contributors 2 | ============ 3 | 4 | These people have contributed to goptions's design and implementation: 5 | 6 | * Andreas Krennmair 7 | * GDG Berlin Golang 8 | -------------------------------------------------------------------------------- /vendor/github.com/voxelbrain/goptions/circle.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: circleci/golang 6 | steps: 7 | - checkout 8 | - run: go get -d . 9 | - run: go test 10 | -------------------------------------------------------------------------------- /vendor/github.com/voxelbrain/goptions/marshaler.go: -------------------------------------------------------------------------------- 1 | package goptions 2 | 3 | type Marshaler interface { 4 | MarshalGoption(s string) error 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/voxelbrain/goptions/special_types.go: -------------------------------------------------------------------------------- 1 | package goptions 2 | 3 | // Help Defines the common help flag. It is handled separately as it will cause 4 | // Parse() to return ErrHelpRequest. 5 | type Help bool 6 | 7 | // Verbs marks the point in the struct where the verbs start. Its value will be 8 | // the name of the selected verb. 9 | type Verbs string 10 | 11 | // A remainder catches all excessive arguments. If both a verb and 12 | // the containing options struct have a remainder field, only the latter one 13 | // will be used. 14 | type Remainder []string 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/syncmap/map.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package syncmap provides a concurrent map implementation. 6 | // This was the prototype for sync.Map which was added to the standard library's 7 | // sync package in Go 1.9. https://golang.org/pkg/sync/#Map. 8 | package syncmap 9 | 10 | import "sync" // home to the standard library's sync.map implementation as of Go 1.9 11 | 12 | // Map is a concurrent map with amortized-constant-time loads, stores, and deletes. 13 | // It is safe for multiple goroutines to call a Map's methods concurrently. 14 | // 15 | // The zero Map is valid and empty. 16 | // 17 | // A Map must not be copied after first use. 18 | type Map = sync.Map 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // System call support for plan9 on arm 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-32 13 | JMP syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 16 | JMP syscall·Syscall6(SB) 17 | 18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 19 | JMP syscall·RawSyscall(SB) 20 | 21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·RawSyscall6(SB) 23 | 24 | TEXT ·seek(SB),NOSPLIT,$0-36 25 | JMP syscall·exit(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | 15 | func ioctl(fd int, req uint, arg uintptr) (err error) { 16 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 17 | if r0 == -1 && er != nil { 18 | err = er 19 | } 20 | return 21 | } 22 | 23 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 24 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 25 | if r0 == -1 && er != nil { 26 | err = er 27 | } 28 | return 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## Download/Install 8 | 9 | The easiest way to install is to run `go get -u golang.org/x/term`. You can 10 | also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. 11 | 12 | ## Report Issues / Send Patches 13 | 14 | This repository uses Gerrit for code changes. To learn how to submit changes to 15 | this repository, see https://golang.org/doc/contribute.html. 16 | 17 | The main issue tracker for the term repository is located at 18 | https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the 19 | subject line, so it is easy to find. 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || linux || solaris || zos 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | --------------------------------------------------------------------------------