panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1535162]
goroutine 1 [running]:
k8s.io/client-go/tools/clientcmd/api/v1.autoConvert_api_AuthInfo_To_v1_AuthInfo(0x1f130c0, 0x0, {0x2283cb8, 0xc000610240})
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/zz_generated.conversion.go:196 +0x22
k8s.io/client-go/tools/clientcmd/api/v1.Convert_api_AuthInfo_To_v1_AuthInfo(...)
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/zz_generated.conversion.go:225
k8s.io/client-go/tools/clientcmd/api/v1.Convert_Map_string_To_Pointer_api_AuthInfo_To_Slice_v1_NamedAuthInfo(0xc000612158, 0xc0001ca318, {0x2283cb8, 0xc000610240})
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/conversion.go:93 +0x270
k8s.io/client-go/tools/clientcmd/api/v1.autoConvert_api_Config_To_v1_Config(0xc000612120, 0xc0001ca2c0, {0x2283cb8, 0xc000610240})
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/zz_generated.conversion.go:323 +0x99
k8s.io/client-go/tools/clientcmd/api/v1.Convert_api_Config_To_v1_Config(...)
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/zz_generated.conversion.go:338
k8s.io/client-go/tools/clientcmd/api/v1.RegisterConversions.func8({0x1f8a8a0, 0xc000612120}, {0x1f8a960, 0xc0001ca2c0}, {0x2283cb8, 0xc000610240})
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/api/v1/zz_generated.conversion.go:74 +0x65
k8s.io/apimachinery/pkg/conversion.(*Converter).Convert(0xc000265290, {0x1f8a8a0, 0xc000612120}, {0x1f8a960, 0xc0001ca2c0}, 0xc000610230)
/go/pkg/mod/k8s.io/[email protected]/pkg/conversion/converter.go:221 +0x3a3
k8s.io/apimachinery/pkg/runtime.(*Scheme).convertToVersion(0xc0002689a0, 0x0, {0x2284000, 0xc000612120}, {0x2284ca8, 0xc0001b9a80})
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:540 +0xe1b
k8s.io/apimachinery/pkg/runtime.(*Scheme).UnsafeConvertToVersion(...)
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:467
k8s.io/apimachinery/pkg/runtime.unsafeObjectConvertor.ConvertToVersion({0xc0002689a0}, {0x2284000, 0xc000612120}, {0x2284ca8, 0xc0001b9a80})
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/helper.go:39 +0x3b
k8s.io/apimachinery/pkg/runtime/serializer/versioning.(*codec).doEncode(0xc000251180, {0x2284000, 0xc000612120}, {0x226dec0, 0xc0004ec1e0})
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/serializer/versioning/versioning.go:232 +0x7fc
k8s.io/apimachinery/pkg/runtime/serializer/versioning.(*codec).Encode(0xc000251180, {0x2284000, 0xc000612120}, {0x226dec0, 0xc0004ec1e0})
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/serializer/versioning/versioning.go:184 +0x106
k8s.io/apimachinery/pkg/runtime.Encode({0xb315008, 0xc000251180}, {0x2284000, 0xc000612120})
/go/pkg/mod/k8s.io/[email protected]/pkg/runtime/codec.go:50 +0x64
k8s.io/client-go/tools/clientcmd.Write(...)
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/loader.go:466
k8s.io/client-go/tools/clientcmd.WriteToFile({{0x0, 0x0}, {0x0, 0x0}, {0x0, 0xc0004ec2d0}, 0xc0004ec300, 0xc0004ec330, 0xc0004ec360, {0x0, ...}, ...}, ...)
/go/pkg/mod/k8s.io/[email protected]/tools/clientcmd/loader.go:419 +0x9e
github.com/sunny0826/kubecm/cmd.WriteConfig(0xb0, {0x7ff7bfeff8a2, 0x1f}, 0xc0004d5980)
/github/workspace/cmd/utils.go:265 +0xa5
github.com/sunny0826/kubecm/cmd.MergeCommand.runMerge({{0x11848a0}}, 0xc000207d88, {0xc000207d60, 0x0, 0x0})
/github/workspace/cmd/merge.go:64 +0x386
github.com/sunny0826/kubecm/cmd.(*MergeCommand).Init.func1(0xc00043d400, {0xc0003dd8c0, 0x2, 0x2})
/github/workspace/cmd/merge.go:28 +0x34
github.com/spf13/cobra.(*Command).execute(0xc00043d400, {0xc0003dd880, 0x2, 0x2})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc00043c500)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main()
/github/workspace/main.go:29 +0x25