How to generate vcf address Book format File by golang
Editor to share with you how to generate golang vcf address book format files, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Foreword:
Vcf file: VCF is an address book format file, generally need to use mobile phone address book import and export file format is vcf format.
Purpose: if you sell a house, or what you do to sell, you can generate a cell phone number in the same city and make a phone call one by one.
1. Source code package number/*@Time: 2021-12-22 17:44@Author: dengfeng_hu@File: phone@Software: GoLand*/import ("bufio"fmt"io"os"strconv"strings"time") const (inputFilePath = "D:/phone.txt" fileName = "Luoyang" last = "36" fileSize = 5outputPath = "D://phoneNumber") func getNum (fileName string) int {var num = 1for {if _ Err:=os.Stat ("D://phoneNumber/" + fileName + strconv.Itoa (num) + ".vcf") Os.IsNotExist (err) {return num} num++}} func Exe () {mid: = read () for iRu