INNER CODE UNIT · Go

main

mweagle/Sparta · cmd/insertTags/main.go:15

func main() {
	targetFile := os.Args[1]
	tags := os.Args[2:]

	// go run tries to compile the targetfile if it has the .go extension, so
	// we don't provide that on the command line and append it here.
	targetFile = fmt.Sprintf("%s.go", targetFile)

	absPath, err := filepath.Abs(targetFile)
	if nil != err {
		panic(err)
	}
	/* #nosec */
	fileContents, err := ioutil.ReadFile(absPath)
	if nil != err {
		panic(err)
	}
	tagString := strings.Join(tags, " ")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…