// newDebugClient initializes a client to run request,
// so its recomendable to not have money in the account for testing
// reads the first two lines of a file, the first one is the api key,
// the second one is the api secret
// **WARNING** DO NOT SHARE YOUR KEYS, KEEP THEM OUT OF THE REPOSITORY
// (with .gitignore for example)
newDebugClient initializes a client to run request,
so its recomendable to not have money in the account for testing
reads the first two lines of a file, the first one is the api key,
the second one is the api secret
WARNING** DO NOT SHARE YOUR KEYS, KEEP THEM OUT OF THE REPOSITORY
(with .gitignore for example)
// newDebugClient initializes a client to run request // so its recomendable to not have money in the account for testing // reads the first two lines of a file the first one is the api key // the second one is the api secret // ** WARNING ** DO NOT SHARE YOUR KEYS KEEP THEM OUT OF THE REPOSITORY // ( with . gitignore for example )
func newDebugClient(filePath string) (*Client, error) {
	file, err := os.Open(filePath)
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()
	scanner := bufio.NewScanner(file)
	scanner.Scan()
	apiKey := scanner.Text()
	scanner.Scan()
	apiSecret := scanner.Text()
	client := NewClient(apiKey, apiSecret)
	return client, nil
}
func newDebugClient ( filePath string ) ( * Client , error ) { file , err := os . Open ( filePath ) if err != nil { log . Fatal ( err ) } defer file . Close ( ) scanner := bufio . NewScanner ( file ) scanner . Scan ( ) apiKey := scanner . Text ( ) scanner . Scan ( ) apiSecret := scanner . Text ( ) client := NewClient ( apiKey , apiSecret ) return client , nil }
newDebugClient initializes a client to run request,
so its recomendable to not have money in the account for testing
reads the first two lines of a file, the first one is the api key,
the second one is the api secret
WARNING** DO NOT SHARE YOUR KEYS, KEEP THEM OUT OF THE REPOSITORY
(with .gitignore for example)
newDebugClient initializes a client to run request so its recomendable to not have money in the account for testing reads the first two lines of a file the first one is the api key the second one is the api secret WARNING ** DO NOT SHARE YOUR KEYS KEEP THEM OUT OF THE REPOSITORY ( with . gitignore for example )