github.com/klaytn/klaytn@v1.12.1/cmd/homi/extra/flags.go (about) 1 // Copyright 2018 The klaytn Authors 2 // Copyright 2017 AMIS Technologies 3 // This file is part of the go-ethereum library. 4 // 5 // The go-ethereum library is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU Lesser General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // The go-ethereum library is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU Lesser General Public License for more details. 14 // 15 // You should have received a copy of the GNU Lesser General Public License 16 // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. 17 18 package extra 19 20 import ( 21 "strings" 22 23 "github.com/urfave/cli/v2" 24 ) 25 26 var ( 27 configFlag = &cli.StringFlag{ 28 Name: "config", 29 Usage: "TOML configuration file", 30 } 31 32 extraDataFlag = &cli.StringFlag{ 33 Name: "extradata", 34 Usage: "Hex string for RLP encoded Istanbul extraData", 35 } 36 37 validatorsFlag = &cli.StringFlag{ 38 Name: "validators", 39 Usage: "Validators for RLP encoded Istanbul extraData", 40 } 41 42 vanityFlag = &cli.StringFlag{ 43 Name: "vanity", 44 Usage: "Vanity for RLP encoded Istanbul extraData", 45 Value: "0x00", 46 } 47 ) 48 49 func splitAndTrim(input string) []string { 50 result := strings.Split(input, ",") 51 for i, r := range result { 52 result[i] = strings.TrimSpace(r) 53 } 54 return result 55 }