github.com/iotexproject/iotex-core@v1.14.1-rc1/tools/newioctl/ioctl.go (about) 1 // Copyright (c) 2022 IoTeX Foundation 2 // This source code is provided 'as is' and no warranties are given as to title or non-infringement, merchantability 3 // or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. 4 // This source code is governed by Apache License 2.0 that can be found in the LICENSE file. 5 6 package main 7 8 import ( 9 "os" 10 11 "github.com/iotexproject/iotex-core/ioctl" 12 "github.com/iotexproject/iotex-core/ioctl/newcmd" 13 "github.com/iotexproject/iotex-core/ioctl/newcmd/config" 14 "github.com/iotexproject/iotex-core/pkg/log" 15 ) 16 17 func main() { 18 readConfig, defaultConfigFile, err := config.InitConfig() 19 if err != nil { 20 log.L().Panic(err.Error()) 21 } 22 client := ioctl.NewClient(readConfig, defaultConfigFile) 23 if err := newcmd.NewIoctl(client).Execute(); err != nil { 24 os.Exit(1) 25 } 26 }