plugeth/accounts/abi
Eng Zer Jun 8d066f1f42
all: use T.TempDir to create temporary test directories (#24633)
This commit replaces ioutil.TempDir with t.TempDir in tests. The
directory created by t.TempDir is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using ioutil.TempDir
had to be removed manually by calling os.RemoveAll, which is omitted in
some tests. The error handling boilerplate e.g.

	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}

is also tedious, but t.TempDir handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 15:44:55 +02:00
..
bind all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
abi_test.go accounts/abi: add basic support for error types (#23161) 2021-10-14 13:33:28 +02:00
abi.go accounts/abi: add basic support for error types (#23161) 2021-10-14 13:33:28 +02:00
argument.go accounts/abi: simplify Arguments.Unpack (#24277) 2022-01-24 17:19:43 +01:00
doc.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
error_handling.go accounts/abi: add basic support for error types (#23161) 2021-10-14 13:33:28 +02:00
error.go accounts/abi: add basic support for error types (#23161) 2021-10-14 13:33:28 +02:00
event_test.go accounts/abi: ABI explicit difference between Unpack and UnpackIntoInterface (#21091) 2020-09-28 14:10:26 +02:00
event.go accounts/abi: improve documentation and names (#21540) 2020-09-20 10:43:57 +02:00
method_test.go accounts/abi: Prevent recalculation of internal fields (#20895) 2020-04-20 09:01:04 +02:00
method.go accounts/abi: improve documentation and names (#21540) 2020-09-20 10:43:57 +02:00
pack_test.go accounts/abi: ABI explicit difference between Unpack and UnpackIntoInterface (#21091) 2020-09-28 14:10:26 +02:00
pack.go accounts/abi: improve documentation and names (#21540) 2020-09-20 10:43:57 +02:00
packing_test.go accounts/abi: ABI explicit difference between Unpack and UnpackIntoInterface (#21091) 2020-09-28 14:10:26 +02:00
reflect_test.go all: remove redundant conversions and import names (#21903) 2020-11-25 21:00:23 +01:00
reflect.go all: fix some go-critic linter warnings (#23709) 2021-10-13 17:31:02 +02:00
selector_parser_test.go accounts/abi: handle tuple arrays in ParseSelector (#24587) 2022-04-08 15:38:23 +02:00
selector_parser.go accounts/abi: handle tuple arrays in ParseSelector (#24587) 2022-04-08 15:38:23 +02:00
topics_test.go accounts/abi: accounts/abi/bind: Move topics to abi package (#21057) 2020-05-12 12:21:40 +02:00
topics.go accounts/abi: improve documentation and names (#21540) 2020-09-20 10:43:57 +02:00
type_test.go all: remove redundant conversions and import names (#21903) 2020-11-25 21:00:23 +01:00
type.go accounts/abi: improve documentation and names (#21540) 2020-09-20 10:43:57 +02:00
unpack_test.go accounts/abi: fix resolving single struct argument (#23573) 2021-09-22 10:18:18 +02:00
unpack.go accounts/abi: avoid unnecessary alloc (#24128) 2021-12-20 10:25:46 +01:00