Skip to content

Instantly share code, notes, and snippets.

@we4tech
Last active October 23, 2020 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save we4tech/77e665271447792aa452bc191f372359 to your computer and use it in GitHub Desktop.
Save we4tech/77e665271447792aa452bc191f372359 to your computer and use it in GitHub Desktop.
Golang test case vs return
package envars
import "errors"
var (
ErrorVaultSecretNotFound2 = errors.New("vault secret not found")
ErrorCannotFindValue2 = errors.New("can not find value")
)
func IsNotFoundError2(err error) bool {
switch {
case errors.Is(err, ErrorVaultSecretNotFound2),
errors.Is(err, ErrorCannotFindValue2):
return true
}
return false
}
"".IsNotFoundError2 STEXT size=183 args=0x18 locals=0x30
0x0000 00000 (pkg/envars/test.go:10) TEXT "".IsNotFoundError2(SB), ABIInternal, $48-24
0x0000 00000 (pkg/envars/test.go:10) MOVQ (TLS), CX
0x0009 00009 (pkg/envars/test.go:10) CMPQ SP, 16(CX)
0x000d 00013 (pkg/envars/test.go:10) PCDATA $0, $-2
0x000d 00013 (pkg/envars/test.go:10) JLS 173
0x0013 00019 (pkg/envars/test.go:10) PCDATA $0, $-1
0x0013 00019 (pkg/envars/test.go:10) SUBQ $48, SP
0x0017 00023 (pkg/envars/test.go:10) MOVQ BP, 40(SP)
0x001c 00028 (pkg/envars/test.go:10) LEAQ 40(SP), BP
0x0021 00033 (pkg/envars/test.go:10) PCDATA $0, $-2
0x0021 00033 (pkg/envars/test.go:10) PCDATA $1, $-2
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $0, gclocals·09cf9819fc716118c209c2d2155a3632(SB)
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB)
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $2, gclocals·0df72512bac2ac449831b69f826d7ec1(SB)
0x0021 00033 (pkg/envars/test.go:12) PCDATA $0, $0
0x0021 00033 (pkg/envars/test.go:12) PCDATA $1, $0
0x0021 00033 (pkg/envars/test.go:12) MOVQ "".err+56(SP), AX
0x0026 00038 (pkg/envars/test.go:12) MOVQ AX, (SP)
0x002a 00042 (pkg/envars/test.go:12) PCDATA $0, $1
0x002a 00042 (pkg/envars/test.go:12) MOVQ "".err+64(SP), CX
0x002f 00047 (pkg/envars/test.go:12) PCDATA $0, $0
0x002f 00047 (pkg/envars/test.go:12) MOVQ CX, 8(SP)
0x0034 00052 (pkg/envars/test.go:12) MOVQ "".ErrorVaultSecretNotFound2(SB), DX
0x003b 00059 (pkg/envars/test.go:12) PCDATA $0, $2
0x003b 00059 (pkg/envars/test.go:12) MOVQ "".ErrorVaultSecretNotFound2+8(SB), BX
0x0042 00066 (pkg/envars/test.go:12) MOVQ DX, 16(SP)
0x0047 00071 (pkg/envars/test.go:12) PCDATA $0, $0
0x0047 00071 (pkg/envars/test.go:12) MOVQ BX, 24(SP)
0x004c 00076 (pkg/envars/test.go:12) CALL errors.Is(SB)
0x0051 00081 (pkg/envars/test.go:12) CMPB 32(SP), $0
0x0056 00086 (pkg/envars/test.go:11) JEQ 103
0x0058 00088 (pkg/envars/test.go:14) PCDATA $1, $1
0x0058 00088 (pkg/envars/test.go:14) MOVB $1, "".~r1+72(SP)
0x005d 00093 (pkg/envars/test.go:14) MOVQ 40(SP), BP
0x0062 00098 (pkg/envars/test.go:14) ADDQ $48, SP
0x0066 00102 (pkg/envars/test.go:14) RET
0x0067 00103 (pkg/envars/test.go:13) PCDATA $1, $0
0x0067 00103 (pkg/envars/test.go:13) MOVQ "".err+56(SP), AX
0x006c 00108 (pkg/envars/test.go:13) MOVQ AX, (SP)
0x0070 00112 (pkg/envars/test.go:13) PCDATA $0, $3
0x0070 00112 (pkg/envars/test.go:13) PCDATA $1, $1
0x0070 00112 (pkg/envars/test.go:13) MOVQ "".err+64(SP), AX
0x0075 00117 (pkg/envars/test.go:13) PCDATA $0, $0
0x0075 00117 (pkg/envars/test.go:13) MOVQ AX, 8(SP)
0x007a 00122 (pkg/envars/test.go:13) MOVQ "".ErrorCannotFindValue2(SB), AX
0x0081 00129 (pkg/envars/test.go:13) PCDATA $0, $1
0x0081 00129 (pkg/envars/test.go:13) MOVQ "".ErrorCannotFindValue2+8(SB), CX
0x0088 00136 (pkg/envars/test.go:13) MOVQ AX, 16(SP)
0x008d 00141 (pkg/envars/test.go:13) PCDATA $0, $0
0x008d 00141 (pkg/envars/test.go:13) MOVQ CX, 24(SP)
0x0092 00146 (pkg/envars/test.go:13) CALL errors.Is(SB)
0x0097 00151 (pkg/envars/test.go:13) CMPB 32(SP), $0
0x009c 00156 (pkg/envars/test.go:11) JNE 88
0x009e 00158 (pkg/envars/test.go:17) MOVB $0, "".~r1+72(SP)
0x00a3 00163 (pkg/envars/test.go:17) MOVQ 40(SP), BP
0x00a8 00168 (pkg/envars/test.go:17) ADDQ $48, SP
0x00ac 00172 (pkg/envars/test.go:17) RET
0x00ad 00173 (pkg/envars/test.go:17) NOP
0x00ad 00173 (pkg/envars/test.go:10) PCDATA $1, $-1
0x00ad 00173 (pkg/envars/test.go:10) PCDATA $0, $-2
0x00ad 00173 (pkg/envars/test.go:10) CALL runtime.morestack_noctxt(SB)
0x00b2 00178 (pkg/envars/test.go:10) PCDATA $0, $-1
0x00b2 00178 (pkg/envars/test.go:10) JMP 0
0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 9a eH..%....H;a....
0x0010 00 00 00 48 83 ec 30 48 89 6c 24 28 48 8d 6c 24 ...H..0H.l$(H.l$
0x0020 28 48 8b 44 24 38 48 89 04 24 48 8b 4c 24 40 48 (H.D$8H..$H.L$@H
0x0030 89 4c 24 08 48 8b 15 00 00 00 00 48 8b 1d 00 00 .L$.H......H....
0x0040 00 00 48 89 54 24 10 48 89 5c 24 18 e8 00 00 00 ..H.T$.H.\$.....
0x0050 00 80 7c 24 20 00 74 0f c6 44 24 48 01 48 8b 6c ..|$ .t..D$H.H.l
0x0060 24 28 48 83 c4 30 c3 48 8b 44 24 38 48 89 04 24 $(H..0.H.D$8H..$
0x0070 48 8b 44 24 40 48 89 44 24 08 48 8b 05 00 00 00 H.D$@H.D$.H.....
0x0080 00 48 8b 0d 00 00 00 00 48 89 44 24 10 48 89 4c .H......H.D$.H.L
0x0090 24 18 e8 00 00 00 00 80 7c 24 20 00 75 ba c6 44 $.......|$ .u..D
0x00a0 24 48 00 48 8b 6c 24 28 48 83 c4 30 c3 e8 00 00 $H.H.l$(H..0....
0x00b0 00 00 e9 49 ff ff ff ...I...
rel 5+4 t=17 TLS+0
rel 55+4 t=16 "".ErrorVaultSecretNotFound2+0
rel 62+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 77+4 t=8 errors.Is+0
rel 125+4 t=16 "".ErrorCannotFindValue2+0
rel 132+4 t=16 "".ErrorCannotFindValue2+8
rel 147+4 t=8 errors.Is+0
rel 174+4 t=8 runtime.morestack_noctxt+0
"".init STEXT size=203 args=0x0 locals=0x28
0x0000 00000 (pkg/envars/test.go:6) TEXT "".init(SB), ABIInternal, $40-0
0x0000 00000 (pkg/envars/test.go:6) MOVQ (TLS), CX
0x0009 00009 (pkg/envars/test.go:6) CMPQ SP, 16(CX)
0x000d 00013 (pkg/envars/test.go:6) PCDATA $0, $-2
0x000d 00013 (pkg/envars/test.go:6) JLS 193
0x0013 00019 (pkg/envars/test.go:6) PCDATA $0, $-1
0x0013 00019 (pkg/envars/test.go:6) SUBQ $40, SP
0x0017 00023 (pkg/envars/test.go:6) MOVQ BP, 32(SP)
0x001c 00028 (pkg/envars/test.go:6) LEAQ 32(SP), BP
0x0021 00033 (pkg/envars/test.go:6) PCDATA $0, $-2
0x0021 00033 (pkg/envars/test.go:6) PCDATA $1, $-2
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $2, gclocals·1cf923758aae2e428391d1783fe59973(SB)
0x0021 00033 (pkg/envars/test.go:6) PCDATA $0, $1
0x0021 00033 (pkg/envars/test.go:6) PCDATA $1, $0
0x0021 00033 (pkg/envars/test.go:6) LEAQ go.string."vault secret not found"(SB), AX
0x0028 00040 (pkg/envars/test.go:6) PCDATA $0, $0
0x0028 00040 (pkg/envars/test.go:6) MOVQ AX, (SP)
0x002c 00044 (pkg/envars/test.go:6) MOVQ $22, 8(SP)
0x0035 00053 (pkg/envars/test.go:6) CALL errors.New(SB)
0x003a 00058 (pkg/envars/test.go:6) MOVQ 16(SP), AX
0x003f 00063 (pkg/envars/test.go:6) PCDATA $0, $2
0x003f 00063 (pkg/envars/test.go:6) MOVQ 24(SP), CX
0x0044 00068 (pkg/envars/test.go:6) MOVQ AX, "".ErrorVaultSecretNotFound2(SB)
0x004b 00075 (pkg/envars/test.go:6) PCDATA $0, $-2
0x004b 00075 (pkg/envars/test.go:6) PCDATA $1, $-2
0x004b 00075 (pkg/envars/test.go:6) CMPL runtime.writeBarrier(SB), $0
0x0052 00082 (pkg/envars/test.go:6) JNE 176
0x0054 00084 (pkg/envars/test.go:6) MOVQ CX, "".ErrorVaultSecretNotFound2+8(SB)
0x005b 00091 (pkg/envars/test.go:7) PCDATA $0, $1
0x005b 00091 (pkg/envars/test.go:7) PCDATA $1, $0
0x005b 00091 (pkg/envars/test.go:7) LEAQ go.string."can not find value"(SB), AX
0x0062 00098 (pkg/envars/test.go:7) PCDATA $0, $0
0x0062 00098 (pkg/envars/test.go:7) MOVQ AX, (SP)
0x0066 00102 (pkg/envars/test.go:7) MOVQ $18, 8(SP)
0x006f 00111 (pkg/envars/test.go:7) CALL errors.New(SB)
0x0074 00116 (pkg/envars/test.go:7) MOVQ 16(SP), AX
0x0079 00121 (pkg/envars/test.go:7) PCDATA $0, $2
0x0079 00121 (pkg/envars/test.go:7) MOVQ 24(SP), CX
0x007e 00126 (pkg/envars/test.go:7) MOVQ AX, "".ErrorCannotFindValue2(SB)
0x0085 00133 (pkg/envars/test.go:7) PCDATA $0, $-2
0x0085 00133 (pkg/envars/test.go:7) PCDATA $1, $-2
0x0085 00133 (pkg/envars/test.go:7) CMPL runtime.writeBarrier(SB), $0
0x008c 00140 (pkg/envars/test.go:7) JNE 159
0x008e 00142 (pkg/envars/test.go:7) MOVQ CX, "".ErrorCannotFindValue2+8(SB)
0x0095 00149 (pkg/envars/test.go:7) PCDATA $0, $-1
0x0095 00149 (pkg/envars/test.go:7) PCDATA $1, $-1
0x0095 00149 (pkg/envars/test.go:7) MOVQ 32(SP), BP
0x009a 00154 (pkg/envars/test.go:7) ADDQ $40, SP
0x009e 00158 (pkg/envars/test.go:7) RET
0x009f 00159 (pkg/envars/test.go:7) PCDATA $0, $-2
0x009f 00159 (pkg/envars/test.go:7) PCDATA $1, $-2
0x009f 00159 (pkg/envars/test.go:7) LEAQ "".ErrorCannotFindValue2+8(SB), DI
0x00a6 00166 (pkg/envars/test.go:7) MOVQ CX, AX
0x00a9 00169 (pkg/envars/test.go:7) CALL runtime.gcWriteBarrier(SB)
0x00ae 00174 (pkg/envars/test.go:7) JMP 149
0x00b0 00176 (pkg/envars/test.go:6) LEAQ "".ErrorVaultSecretNotFound2+8(SB), DI
0x00b7 00183 (pkg/envars/test.go:6) MOVQ CX, AX
0x00ba 00186 (pkg/envars/test.go:6) CALL runtime.gcWriteBarrier(SB)
0x00bf 00191 (pkg/envars/test.go:6) JMP 91
0x00c1 00193 (pkg/envars/test.go:6) NOP
0x00c1 00193 (pkg/envars/test.go:6) PCDATA $1, $-1
0x00c1 00193 (pkg/envars/test.go:6) PCDATA $0, $-2
0x00c1 00193 (pkg/envars/test.go:6) CALL runtime.morestack_noctxt(SB)
0x00c6 00198 (pkg/envars/test.go:6) PCDATA $0, $-1
0x00c6 00198 (pkg/envars/test.go:6) JMP 0
0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 ae eH..%....H;a....
0x0010 00 00 00 48 83 ec 28 48 89 6c 24 20 48 8d 6c 24 ...H..(H.l$ H.l$
0x0020 20 48 8d 05 00 00 00 00 48 89 04 24 48 c7 44 24 H......H..$H.D$
0x0030 08 16 00 00 00 e8 00 00 00 00 48 8b 44 24 10 48 ..........H.D$.H
0x0040 8b 4c 24 18 48 89 05 00 00 00 00 83 3d 00 00 00 .L$.H.......=...
0x0050 00 00 75 5c 48 89 0d 00 00 00 00 48 8d 05 00 00 ..u\H......H....
0x0060 00 00 48 89 04 24 48 c7 44 24 08 12 00 00 00 e8 ..H..$H.D$......
0x0070 00 00 00 00 48 8b 44 24 10 48 8b 4c 24 18 48 89 ....H.D$.H.L$.H.
0x0080 05 00 00 00 00 83 3d 00 00 00 00 00 75 11 48 89 ......=.....u.H.
0x0090 0d 00 00 00 00 48 8b 6c 24 20 48 83 c4 28 c3 48 .....H.l$ H..(.H
0x00a0 8d 3d 00 00 00 00 48 89 c8 e8 00 00 00 00 eb e5 .=....H.........
0x00b0 48 8d 3d 00 00 00 00 48 89 c8 e8 00 00 00 00 eb H.=....H........
0x00c0 9a e8 00 00 00 00 e9 35 ff ff ff .......5...
rel 5+4 t=17 TLS+0
rel 36+4 t=16 go.string."vault secret not found"+0
rel 54+4 t=8 errors.New+0
rel 71+4 t=16 "".ErrorVaultSecretNotFound2+0
rel 77+4 t=16 runtime.writeBarrier+-1
rel 87+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 94+4 t=16 go.string."can not find value"+0
rel 112+4 t=8 errors.New+0
rel 129+4 t=16 "".ErrorCannotFindValue2+0
rel 135+4 t=16 runtime.writeBarrier+-1
rel 145+4 t=16 "".ErrorCannotFindValue2+8
rel 162+4 t=16 "".ErrorCannotFindValue2+8
rel 170+4 t=8 runtime.gcWriteBarrier+0
rel 179+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 187+4 t=8 runtime.gcWriteBarrier+0
rel 194+4 t=8 runtime.morestack_noctxt+0
go.cuinfo.packagename. SDWARFINFO dupok size=0
0x0000 65 6e 76 61 72 73 envars
go.loc."".IsNotFoundError2 SDWARFLOC size=41
0x0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0010 07 00 9c 93 08 91 08 93 08 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 00 .........
rel 0+8 t=53 "".IsNotFoundError2+0
rel 8+8 t=53 "".IsNotFoundError2+183
go.info."".IsNotFoundError2 SDWARFINFO size=72
0x0000 03 22 22 2e 49 73 4e 6f 74 46 6f 75 6e 64 45 72 ."".IsNotFoundEr
0x0010 72 6f 72 32 00 00 00 00 00 00 00 00 00 00 00 00 ror2............
0x0020 00 00 00 00 00 01 9c 00 00 00 00 01 10 65 72 72 .............err
0x0030 00 00 0a 00 00 00 00 00 00 00 00 0f 7e 72 31 00 ............~r1.
0x0040 01 0a 00 00 00 00 00 00 ........
rel 0+0 t=24 type.bool+0
rel 0+0 t=24 type.error+0
rel 21+8 t=1 "".IsNotFoundError2+0
rel 29+8 t=1 "".IsNotFoundError2+183
rel 39+4 t=30 gofile../Users/hossain.khan/WeWork/wectl/pkg/envars/test.go+0
rel 51+4 t=29 go.info.error+0
rel 55+4 t=29 go.loc."".IsNotFoundError2+0
rel 66+4 t=29 go.info.bool+0
go.range."".IsNotFoundError2 SDWARFRANGE size=0
go.debuglines."".IsNotFoundError2 SDWARFMISC size=45
0x0000 04 02 03 04 14 0a cd 9d 06 41 06 08 9b 06 41 06 .........A....A.
0x0010 40 26 06 41 06 72 06 41 06 08 9b 06 41 06 3f 03 @&.A.r.A....A.?.
0x0020 01 28 06 41 06 03 7d 6f 04 01 03 77 01 .(.A..}o...w.
go.string."vault secret not found" SRODATA dupok size=22
0x0000 76 61 75 6c 74 20 73 65 63 72 65 74 20 6e 6f 74 vault secret not
0x0010 20 66 6f 75 6e 64 found
go.string."can not find value" SRODATA dupok size=18
0x0000 63 61 6e 20 6e 6f 74 20 66 69 6e 64 20 76 61 6c can not find val
0x0010 75 65 ue
go.loc."".init SDWARFLOC size=0
go.info."".init SDWARFINFO size=33
0x0000 03 22 22 2e 69 6e 69 74 00 00 00 00 00 00 00 00 ."".init........
0x0010 00 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 ................
0x0020 00 .
rel 9+8 t=1 "".init+0
rel 17+8 t=1 "".init+203
rel 27+4 t=30 gofile../Users/hossain.khan/WeWork/wectl/pkg/envars/test.go+0
go.range."".init SDWARFRANGE size=0
go.debuglines."".init SDWARFMISC size=30
0x0000 04 02 14 0a cd 06 e1 06 02 1c f6 06 55 06 91 06 ............U...
0x0010 41 06 08 69 06 73 b8 06 b9 04 01 03 7b 01 A..i.s......{.
""..inittask SNOPTRDATA size=40
0x0000 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
0x0010 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 ........
rel 24+8 t=1 errors..inittask+0
rel 32+8 t=1 "".init+0
"".ErrorVaultSecretNotFound2 SBSS size=16
"".ErrorCannotFindValue2 SBSS size=16
type..importpath.errors. SRODATA dupok size=9
0x0000 00 00 06 65 72 72 6f 72 73 ...errors
gclocals·09cf9819fc716118c209c2d2155a3632 SRODATA dupok size=10
0x0000 02 00 00 00 02 00 00 00 02 00 ..........
gclocals·69c1753bd5f81501d95132d08af04464 SRODATA dupok size=8
0x0000 02 00 00 00 00 00 00 00 ........
gclocals·0df72512bac2ac449831b69f826d7ec1 SRODATA dupok size=12
0x0000 04 00 00 00 04 00 00 00 00 02 08 01 ............
gclocals·33cdeccccebe80329f1fdbee7f5874cb SRODATA dupok size=8
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·1cf923758aae2e428391d1783fe59973 SRODATA dupok size=11
0x0000 03 00 00 00 02 00 00 00 00 01 02 ...........
package envars
import "errors"
var (
ErrorVaultSecretNotFound2 = errors.New("vault secret not found")
ErrorCannotFindValue2 = errors.New("can not find value")
)
func IsNotFoundError1(err error) bool {
if err == nil {
return false
}
return errors.Is(err, ErrorVaultSecretNotFound2) ||
errors.Is(err, ErrorCannotFindValue2)
}
"".IsNotFoundError1 STEXT size=192 args=0x18 locals=0x30
0x0000 00000 (pkg/envars/test.go:10) TEXT "".IsNotFoundError1(SB), ABIInternal, $48-24
0x0000 00000 (pkg/envars/test.go:10) MOVQ (TLS), CX
0x0009 00009 (pkg/envars/test.go:10) CMPQ SP, 16(CX)
0x000d 00013 (pkg/envars/test.go:10) PCDATA $0, $-2
0x000d 00013 (pkg/envars/test.go:10) JLS 182
0x0013 00019 (pkg/envars/test.go:10) PCDATA $0, $-1
0x0013 00019 (pkg/envars/test.go:10) SUBQ $48, SP
0x0017 00023 (pkg/envars/test.go:10) MOVQ BP, 40(SP)
0x001c 00028 (pkg/envars/test.go:10) LEAQ 40(SP), BP
0x0021 00033 (pkg/envars/test.go:10) PCDATA $0, $-2
0x0021 00033 (pkg/envars/test.go:10) PCDATA $1, $-2
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $0, gclocals·09cf9819fc716118c209c2d2155a3632(SB)
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB)
0x0021 00033 (pkg/envars/test.go:10) FUNCDATA $2, gclocals·0df72512bac2ac449831b69f826d7ec1(SB)
0x0021 00033 (pkg/envars/test.go:11) PCDATA $0, $0
0x0021 00033 (pkg/envars/test.go:11) PCDATA $1, $0
0x0021 00033 (pkg/envars/test.go:11) MOVQ "".err+56(SP), AX
0x0026 00038 (pkg/envars/test.go:11) TESTQ AX, AX
0x0029 00041 (pkg/envars/test.go:11) JEQ 167
0x002b 00043 (pkg/envars/test.go:15) MOVQ AX, (SP)
0x002f 00047 (pkg/envars/test.go:15) PCDATA $0, $1
0x002f 00047 (pkg/envars/test.go:15) MOVQ "".err+64(SP), CX
0x0034 00052 (pkg/envars/test.go:15) PCDATA $0, $0
0x0034 00052 (pkg/envars/test.go:15) MOVQ CX, 8(SP)
0x0039 00057 (pkg/envars/test.go:15) MOVQ "".ErrorVaultSecretNotFound2(SB), DX
0x0040 00064 (pkg/envars/test.go:15) PCDATA $0, $2
0x0040 00064 (pkg/envars/test.go:15) MOVQ "".ErrorVaultSecretNotFound2+8(SB), BX
0x0047 00071 (pkg/envars/test.go:15) MOVQ DX, 16(SP)
0x004c 00076 (pkg/envars/test.go:15) PCDATA $0, $0
0x004c 00076 (pkg/envars/test.go:15) MOVQ BX, 24(SP)
0x0051 00081 (pkg/envars/test.go:15) CALL errors.Is(SB)
0x0056 00086 (pkg/envars/test.go:15) CMPB 32(SP), $0
0x005b 00091 (pkg/envars/test.go:15) JEQ 112
0x005d 00093 (pkg/envars/test.go:15) PCDATA $1, $1
0x005d 00093 (pkg/envars/test.go:15) MOVL $1, AX
0x0062 00098 (pkg/envars/test.go:15) MOVB AL, "".~r1+72(SP)
0x0066 00102 (pkg/envars/test.go:15) MOVQ 40(SP), BP
0x006b 00107 (pkg/envars/test.go:15) ADDQ $48, SP
0x006f 00111 (pkg/envars/test.go:15) RET
0x0070 00112 (pkg/envars/test.go:16) PCDATA $1, $0
0x0070 00112 (pkg/envars/test.go:16) MOVQ "".err+56(SP), AX
0x0075 00117 (pkg/envars/test.go:16) MOVQ AX, (SP)
0x0079 00121 (pkg/envars/test.go:16) PCDATA $0, $3
0x0079 00121 (pkg/envars/test.go:16) PCDATA $1, $1
0x0079 00121 (pkg/envars/test.go:16) MOVQ "".err+64(SP), AX
0x007e 00126 (pkg/envars/test.go:16) PCDATA $0, $0
0x007e 00126 (pkg/envars/test.go:16) MOVQ AX, 8(SP)
0x0083 00131 (pkg/envars/test.go:16) MOVQ "".ErrorCannotFindValue2(SB), AX
0x008a 00138 (pkg/envars/test.go:16) PCDATA $0, $1
0x008a 00138 (pkg/envars/test.go:16) MOVQ "".ErrorCannotFindValue2+8(SB), CX
0x0091 00145 (pkg/envars/test.go:16) MOVQ AX, 16(SP)
0x0096 00150 (pkg/envars/test.go:16) PCDATA $0, $0
0x0096 00150 (pkg/envars/test.go:16) MOVQ CX, 24(SP)
0x009b 00155 (pkg/envars/test.go:16) CALL errors.Is(SB)
0x00a0 00160 (pkg/envars/test.go:16) MOVBLZX 32(SP), AX
0x00a5 00165 (pkg/envars/test.go:15) JMP 98
0x00a7 00167 (pkg/envars/test.go:12) MOVB $0, "".~r1+72(SP)
0x00ac 00172 (pkg/envars/test.go:12) MOVQ 40(SP), BP
0x00b1 00177 (pkg/envars/test.go:12) ADDQ $48, SP
0x00b5 00181 (pkg/envars/test.go:12) RET
0x00b6 00182 (pkg/envars/test.go:12) NOP
0x00b6 00182 (pkg/envars/test.go:10) PCDATA $1, $-1
0x00b6 00182 (pkg/envars/test.go:10) PCDATA $0, $-2
0x00b6 00182 (pkg/envars/test.go:10) CALL runtime.morestack_noctxt(SB)
0x00bb 00187 (pkg/envars/test.go:10) PCDATA $0, $-1
0x00bb 00187 (pkg/envars/test.go:10) JMP 0
0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 a3 eH..%....H;a....
0x0010 00 00 00 48 83 ec 30 48 89 6c 24 28 48 8d 6c 24 ...H..0H.l$(H.l$
0x0020 28 48 8b 44 24 38 48 85 c0 74 7c 48 89 04 24 48 (H.D$8H..t|H..$H
0x0030 8b 4c 24 40 48 89 4c 24 08 48 8b 15 00 00 00 00 .L$@H.L$.H......
0x0040 48 8b 1d 00 00 00 00 48 89 54 24 10 48 89 5c 24 H......H.T$.H.\$
0x0050 18 e8 00 00 00 00 80 7c 24 20 00 74 13 b8 01 00 .......|$ .t....
0x0060 00 00 88 44 24 48 48 8b 6c 24 28 48 83 c4 30 c3 ...D$HH.l$(H..0.
0x0070 48 8b 44 24 38 48 89 04 24 48 8b 44 24 40 48 89 H.D$8H..$H.D$@H.
0x0080 44 24 08 48 8b 05 00 00 00 00 48 8b 0d 00 00 00 D$.H......H.....
0x0090 00 48 89 44 24 10 48 89 4c 24 18 e8 00 00 00 00 .H.D$.H.L$......
0x00a0 0f b6 44 24 20 eb bb c6 44 24 48 00 48 8b 6c 24 ..D$ ...D$H.H.l$
0x00b0 28 48 83 c4 30 c3 e8 00 00 00 00 e9 40 ff ff ff (H..0.......@...
rel 5+4 t=17 TLS+0
rel 60+4 t=16 "".ErrorVaultSecretNotFound2+0
rel 67+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 82+4 t=8 errors.Is+0
rel 134+4 t=16 "".ErrorCannotFindValue2+0
rel 141+4 t=16 "".ErrorCannotFindValue2+8
rel 156+4 t=8 errors.Is+0
rel 183+4 t=8 runtime.morestack_noctxt+0
"".init STEXT size=203 args=0x0 locals=0x28
0x0000 00000 (pkg/envars/test.go:6) TEXT "".init(SB), ABIInternal, $40-0
0x0000 00000 (pkg/envars/test.go:6) MOVQ (TLS), CX
0x0009 00009 (pkg/envars/test.go:6) CMPQ SP, 16(CX)
0x000d 00013 (pkg/envars/test.go:6) PCDATA $0, $-2
0x000d 00013 (pkg/envars/test.go:6) JLS 193
0x0013 00019 (pkg/envars/test.go:6) PCDATA $0, $-1
0x0013 00019 (pkg/envars/test.go:6) SUBQ $40, SP
0x0017 00023 (pkg/envars/test.go:6) MOVQ BP, 32(SP)
0x001c 00028 (pkg/envars/test.go:6) LEAQ 32(SP), BP
0x0021 00033 (pkg/envars/test.go:6) PCDATA $0, $-2
0x0021 00033 (pkg/envars/test.go:6) PCDATA $1, $-2
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0021 00033 (pkg/envars/test.go:6) FUNCDATA $2, gclocals·1cf923758aae2e428391d1783fe59973(SB)
0x0021 00033 (pkg/envars/test.go:6) PCDATA $0, $1
0x0021 00033 (pkg/envars/test.go:6) PCDATA $1, $0
0x0021 00033 (pkg/envars/test.go:6) LEAQ go.string."vault secret not found"(SB), AX
0x0028 00040 (pkg/envars/test.go:6) PCDATA $0, $0
0x0028 00040 (pkg/envars/test.go:6) MOVQ AX, (SP)
0x002c 00044 (pkg/envars/test.go:6) MOVQ $22, 8(SP)
0x0035 00053 (pkg/envars/test.go:6) CALL errors.New(SB)
0x003a 00058 (pkg/envars/test.go:6) MOVQ 16(SP), AX
0x003f 00063 (pkg/envars/test.go:6) PCDATA $0, $2
0x003f 00063 (pkg/envars/test.go:6) MOVQ 24(SP), CX
0x0044 00068 (pkg/envars/test.go:6) MOVQ AX, "".ErrorVaultSecretNotFound2(SB)
0x004b 00075 (pkg/envars/test.go:6) PCDATA $0, $-2
0x004b 00075 (pkg/envars/test.go:6) PCDATA $1, $-2
0x004b 00075 (pkg/envars/test.go:6) CMPL runtime.writeBarrier(SB), $0
0x0052 00082 (pkg/envars/test.go:6) JNE 176
0x0054 00084 (pkg/envars/test.go:6) MOVQ CX, "".ErrorVaultSecretNotFound2+8(SB)
0x005b 00091 (pkg/envars/test.go:7) PCDATA $0, $1
0x005b 00091 (pkg/envars/test.go:7) PCDATA $1, $0
0x005b 00091 (pkg/envars/test.go:7) LEAQ go.string."can not find value"(SB), AX
0x0062 00098 (pkg/envars/test.go:7) PCDATA $0, $0
0x0062 00098 (pkg/envars/test.go:7) MOVQ AX, (SP)
0x0066 00102 (pkg/envars/test.go:7) MOVQ $18, 8(SP)
0x006f 00111 (pkg/envars/test.go:7) CALL errors.New(SB)
0x0074 00116 (pkg/envars/test.go:7) MOVQ 16(SP), AX
0x0079 00121 (pkg/envars/test.go:7) PCDATA $0, $2
0x0079 00121 (pkg/envars/test.go:7) MOVQ 24(SP), CX
0x007e 00126 (pkg/envars/test.go:7) MOVQ AX, "".ErrorCannotFindValue2(SB)
0x0085 00133 (pkg/envars/test.go:7) PCDATA $0, $-2
0x0085 00133 (pkg/envars/test.go:7) PCDATA $1, $-2
0x0085 00133 (pkg/envars/test.go:7) CMPL runtime.writeBarrier(SB), $0
0x008c 00140 (pkg/envars/test.go:7) JNE 159
0x008e 00142 (pkg/envars/test.go:7) MOVQ CX, "".ErrorCannotFindValue2+8(SB)
0x0095 00149 (pkg/envars/test.go:7) PCDATA $0, $-1
0x0095 00149 (pkg/envars/test.go:7) PCDATA $1, $-1
0x0095 00149 (pkg/envars/test.go:7) MOVQ 32(SP), BP
0x009a 00154 (pkg/envars/test.go:7) ADDQ $40, SP
0x009e 00158 (pkg/envars/test.go:7) RET
0x009f 00159 (pkg/envars/test.go:7) PCDATA $0, $-2
0x009f 00159 (pkg/envars/test.go:7) PCDATA $1, $-2
0x009f 00159 (pkg/envars/test.go:7) LEAQ "".ErrorCannotFindValue2+8(SB), DI
0x00a6 00166 (pkg/envars/test.go:7) MOVQ CX, AX
0x00a9 00169 (pkg/envars/test.go:7) CALL runtime.gcWriteBarrier(SB)
0x00ae 00174 (pkg/envars/test.go:7) JMP 149
0x00b0 00176 (pkg/envars/test.go:6) LEAQ "".ErrorVaultSecretNotFound2+8(SB), DI
0x00b7 00183 (pkg/envars/test.go:6) MOVQ CX, AX
0x00ba 00186 (pkg/envars/test.go:6) CALL runtime.gcWriteBarrier(SB)
0x00bf 00191 (pkg/envars/test.go:6) JMP 91
0x00c1 00193 (pkg/envars/test.go:6) NOP
0x00c1 00193 (pkg/envars/test.go:6) PCDATA $1, $-1
0x00c1 00193 (pkg/envars/test.go:6) PCDATA $0, $-2
0x00c1 00193 (pkg/envars/test.go:6) CALL runtime.morestack_noctxt(SB)
0x00c6 00198 (pkg/envars/test.go:6) PCDATA $0, $-1
0x00c6 00198 (pkg/envars/test.go:6) JMP 0
0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 ae eH..%....H;a....
0x0010 00 00 00 48 83 ec 28 48 89 6c 24 20 48 8d 6c 24 ...H..(H.l$ H.l$
0x0020 20 48 8d 05 00 00 00 00 48 89 04 24 48 c7 44 24 H......H..$H.D$
0x0030 08 16 00 00 00 e8 00 00 00 00 48 8b 44 24 10 48 ..........H.D$.H
0x0040 8b 4c 24 18 48 89 05 00 00 00 00 83 3d 00 00 00 .L$.H.......=...
0x0050 00 00 75 5c 48 89 0d 00 00 00 00 48 8d 05 00 00 ..u\H......H....
0x0060 00 00 48 89 04 24 48 c7 44 24 08 12 00 00 00 e8 ..H..$H.D$......
0x0070 00 00 00 00 48 8b 44 24 10 48 8b 4c 24 18 48 89 ....H.D$.H.L$.H.
0x0080 05 00 00 00 00 83 3d 00 00 00 00 00 75 11 48 89 ......=.....u.H.
0x0090 0d 00 00 00 00 48 8b 6c 24 20 48 83 c4 28 c3 48 .....H.l$ H..(.H
0x00a0 8d 3d 00 00 00 00 48 89 c8 e8 00 00 00 00 eb e5 .=....H.........
0x00b0 48 8d 3d 00 00 00 00 48 89 c8 e8 00 00 00 00 eb H.=....H........
0x00c0 9a e8 00 00 00 00 e9 35 ff ff ff .......5...
rel 5+4 t=17 TLS+0
rel 36+4 t=16 go.string."vault secret not found"+0
rel 54+4 t=8 errors.New+0
rel 71+4 t=16 "".ErrorVaultSecretNotFound2+0
rel 77+4 t=16 runtime.writeBarrier+-1
rel 87+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 94+4 t=16 go.string."can not find value"+0
rel 112+4 t=8 errors.New+0
rel 129+4 t=16 "".ErrorCannotFindValue2+0
rel 135+4 t=16 runtime.writeBarrier+-1
rel 145+4 t=16 "".ErrorCannotFindValue2+8
rel 162+4 t=16 "".ErrorCannotFindValue2+8
rel 170+4 t=8 runtime.gcWriteBarrier+0
rel 179+4 t=16 "".ErrorVaultSecretNotFound2+8
rel 187+4 t=8 runtime.gcWriteBarrier+0
rel 194+4 t=8 runtime.morestack_noctxt+0
go.cuinfo.packagename. SDWARFINFO dupok size=0
0x0000 65 6e 76 61 72 73 envars
go.loc."".IsNotFoundError1 SDWARFLOC size=41
0x0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0010 07 00 9c 93 08 91 08 93 08 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 00 .........
rel 0+8 t=53 "".IsNotFoundError1+0
rel 8+8 t=53 "".IsNotFoundError1+192
go.info."".IsNotFoundError1 SDWARFINFO size=72
0x0000 03 22 22 2e 49 73 4e 6f 74 46 6f 75 6e 64 45 72 ."".IsNotFoundEr
0x0010 72 6f 72 31 00 00 00 00 00 00 00 00 00 00 00 00 ror1............
0x0020 00 00 00 00 00 01 9c 00 00 00 00 01 10 65 72 72 .............err
0x0030 00 00 0a 00 00 00 00 00 00 00 00 0f 7e 72 31 00 ............~r1.
0x0040 01 0a 00 00 00 00 00 00 ........
rel 0+0 t=24 type.bool+0
rel 0+0 t=24 type.error+0
rel 21+8 t=1 "".IsNotFoundError1+0
rel 29+8 t=1 "".IsNotFoundError1+192
rel 39+4 t=30 gofile../Users/hossain.khan/WeWork/wectl/pkg/envars/test.go+0
rel 51+4 t=29 go.info.error+0
rel 55+4 t=29 go.loc."".IsNotFoundError1+0
rel 66+4 t=29 go.info.bool+0
go.range."".IsNotFoundError1 SDWARFRANGE size=0
go.debuglines."".IsNotFoundError1 SDWARFMISC size=44
0x0000 04 02 03 04 14 0a cd 9c 06 41 06 45 06 37 06 08 .........A.E.7..
0x0010 73 06 41 06 87 06 37 06 74 06 41 06 08 9b 06 41 s.A...7.t.A....A
0x0020 06 40 20 06 41 06 71 04 01 03 77 01 .@ .A.q...w.
go.string."vault secret not found" SRODATA dupok size=22
0x0000 76 61 75 6c 74 20 73 65 63 72 65 74 20 6e 6f 74 vault secret not
0x0010 20 66 6f 75 6e 64 found
go.string."can not find value" SRODATA dupok size=18
0x0000 63 61 6e 20 6e 6f 74 20 66 69 6e 64 20 76 61 6c can not find val
0x0010 75 65 ue
go.loc."".init SDWARFLOC size=0
go.info."".init SDWARFINFO size=33
0x0000 03 22 22 2e 69 6e 69 74 00 00 00 00 00 00 00 00 ."".init........
0x0010 00 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 ................
0x0020 00 .
rel 9+8 t=1 "".init+0
rel 17+8 t=1 "".init+203
rel 27+4 t=30 gofile../Users/hossain.khan/WeWork/wectl/pkg/envars/test.go+0
go.range."".init SDWARFRANGE size=0
go.debuglines."".init SDWARFMISC size=30
0x0000 04 02 14 0a cd 06 e1 06 02 1c f6 06 55 06 91 06 ............U...
0x0010 41 06 08 69 06 73 b8 06 b9 04 01 03 7b 01 A..i.s......{.
""..inittask SNOPTRDATA size=40
0x0000 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
0x0010 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 ........
rel 24+8 t=1 errors..inittask+0
rel 32+8 t=1 "".init+0
"".ErrorVaultSecretNotFound2 SBSS size=16
"".ErrorCannotFindValue2 SBSS size=16
type..importpath.errors. SRODATA dupok size=9
0x0000 00 00 06 65 72 72 6f 72 73 ...errors
gclocals·09cf9819fc716118c209c2d2155a3632 SRODATA dupok size=10
0x0000 02 00 00 00 02 00 00 00 02 00 ..........
gclocals·69c1753bd5f81501d95132d08af04464 SRODATA dupok size=8
0x0000 02 00 00 00 00 00 00 00 ........
gclocals·0df72512bac2ac449831b69f826d7ec1 SRODATA dupok size=12
0x0000 04 00 00 00 04 00 00 00 00 02 08 01 ............
gclocals·33cdeccccebe80329f1fdbee7f5874cb SRODATA dupok size=8
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·1cf923758aae2e428391d1783fe59973 SRODATA dupok size=11
0x0000 03 00 00 00 02 00 00 00 00 01 02 ...........
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment