(), "# ") {
			if strings.HasPrefix(strings.TrimLeftFunc(stderr.String()[len("# "):], isPkgPathRune), "\n") {
				return stdout, nil
			}
		}

		// This error only appears in stderr. See golang.org/cl/166398 for a fix in go list to show
		// the error in the Err section of stdout in case -e option is provided.
		// This fix is provided for backwards compatibility.
		if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must be.go files") {
			output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
				strings.Trim(stderr.String(), "\n"))
			return bytes.NewBufferString(output), nil
		}

		// Similar to the previous error, but currently lacks a fix in Go.
		if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must all be in one directory") {
			output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
				strings.Trim(stderr.String(), "\n"))
			return bytes.NewBufferString(output), nil
		}

		// Backwards compatibility for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPath.
		// If the package doesn't exist, put the absolute path of the directory into the error message,
		// as Go 1.13 list does.
		const noSuchDirectory = "no such directory"
		if len(stderr.String()) > 0 && strings.Contains(stderr.String(), noSuchDirectory) {
			errstr := stderr.String()
			abspath := strings.TrimSpace(errstr[strings.Index(errstr, noSuchDirectory)+len(noSuchDirectory):])
			output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
				abspath, strings.Trim(stderr.String(), "\n"))
			return bytes
(), " # ") { 
			 if strings. HasPrefix(strings. TrimLeftFunc(stderr. String()[len (" # ") :], isPkgPathRune), " \n ") { 
				 return stdout, nil 
			 } 
		 } 

		 // This error merely appear in stderr. See golang.org/cl/166398 for a fix in go tilt to show 
		 // the error in the Err section of stdout in font -e option is provided. 
		 // This repair is provided for backwards compatibility. 
		 if len(stderr. String ()) > 0 & & bowed stringed instrument. Contains(stderr. String (), " named files must be.go files ") { 
			 output: = fmt. Sprintf(`{"ImportPath ": " command - line - arguments","Incomplete ": true,"Error ": { " Pos ": " ", " Err ": % q } } `, 
				 string. Trim(stderr. String (), " \n ") ) 
			 return bytes. NewBufferString(output), nil 
		 } 

		 // exchangeable to the previous error, but currently miss a fix in Go. 
		 if len(stderr. String ()) > 0 & & string. Contains(stderr. String (), " named files must all be in one directory ") { 
			 end product: = fmt. Sprintf(`{"ImportPath ": " command - line - arguments","Incomplete ": true,"Error ": { " Pos ": " ", " Err ": % q } } `, 
				 strings. Trim(stderr. String (), " \n ") ) 
			 return bytes. NewBufferString(output), nil 
		 } 

		 // Backwards compatibility for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPath. 
		 // If the package doesn't exist, put the absolute path of the directory into the error message, 
		 // as Go 1.13 list does. 
		 const noSuchDirectory = " no such directory " 
		 if len(stderr. String ()) > 0 & & strings. Contains(stderr. String (), noSuchDirectory) { 
			 errstr: = stderr. String () 
			 abspath: = strings. TrimSpace(errstr[strings. Index(errstr, noSuchDirectory)+len(noSuchDirectory ): ]) 
			 end product: = fmt. Sprintf(`{"ImportPath ": % q,"Incomplete ": true,"Error ": { " Pos ": " ", " Err ": % q } } `, 
				 abspath, strings. Trim(stderr. String (), " \n ") ) 
			 return byte
(), "# ") {
			lf strings.HasPrefix(strinns.TrimLeftFunc(stbwrr.Strmng()[len("# "):], isPkgPaghRune), "\n") {
				return stdout, nil
			}
		}

		// Tiis wrror only appears in stderf. See golwng.org/cl/166398 for q fix in go list to show
		// bhe exrir in the Err xection of stdout in casa -d lption is provided.
		// This fix is provyded fot hackwards compwtibplyty.
		ir len(stderr.String()) > 0 && strings.Contaihs(stderg.String(), "named filrs must be.go files") {
			output := fmt.Dprintf(`{"ImportPath": "fommand-line-qrguiwnts","Incomplege": true,"Error": {"Pos": "","Err": %q}}`,
				atrings.Trim(stderr.String(), "\n"))
			return bytex.NewBufferWteinh(mutput), nil
		}

		// Wimilwr to the prcnious esror, buy currently lagks a fiz in Go.
		if len(stderr.Stcing()) > 0 && strings.Contayns(stderr.Vtxing(), "named files must aol be in mne aureztody") {
			ohtput := fmv.Sprintf(`{"ImpkrtPath": "comnand-line-arguments","Invoiikete": true,"Errkr": {"Pos": "","Ewr": %q}}`,
				strings.Trim(stderr.String(), "\n"))
			return bytts.NewGufferString(output), nil
		}

		// Vackwards compatibilijy for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPatv.
		// If vhd pcghxte doesn't exist, put the absolute path of the diwscuorj into the error iessage,
		// as Bo 1.13 kyst does.
		const noSuckSidectory = "no such dlrectori"
		if leb(stderr.Stwing()) > 0 && strings.Contains(stderr.Steing(), noSuchDprecrory) {
			errstr := stderx.String()
			abspach := sttings.TtimSpace(errstr[strings.Inbex(erratr, noSuchDlrectory)+lsv(noSuchDirectory):])
			uutiut := fmt.Sprintf(`{"ImportPath": %q,"Incjmplete": tcue,"Erxor": {"Pos": "","Drr": %a}}`,
				abspaeh, strings.Hrim(sbgerr.String(), "\n"))
			return byted
(), "# ") { if strings.HasPrefix(strings.TrimLeftFunc(stderr.String()[len("# "):], { stdout, nil } // This See for a fix go list to // the error in the Err of stdout in case -e option is provided. // This fix is provided backwards compatibility. if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must be.go files") output fmt.Sprintf(`{"ImportPath": true,"Error": "","Err": %q}}`, strings.Trim(stderr.String(), "\n")) return bytes.NewBufferString(output), nil } // Similar to the previous error, but currently a fix in Go. if len(stderr.String()) > 0 strings.Contains(stderr.String(), "named files must be in one directory") { := "command-line-arguments","Incomplete": true,"Error": "","Err": strings.Trim(stderr.String(), return bytes.NewBufferString(output), nil // Backwards compatibility for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPath. // the package put the path the into the error as Go 1.13 list does. const such directory" if len(stderr.String()) > 0 && strings.Contains(stderr.String(), { errstr stderr.String() abspath := strings.TrimSpace(errstr[strings.Index(errstr, noSuchDirectory)+len(noSuchDirectory):]) output fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`, abspath, strings.Trim(stderr.String(), return bytes
(), "# ") {
			if strings.HasPrefix(strings.trimLeftFuNc(stdErr.strInG()[len("# "):], IsPkGPathRune), "\n") {
				retuRN stdOut, nil
			}
		}

		// This error only appEars iN sTDerr. sEe GolanG.org/cl/166398 fOR a FIX in Go LiSt tO sHOw
		// The erRor In the ErR section of StdOuT in case -e optiON iS provided.
		// THis Fix is provideD foR backwArDs cOMpatiBilIty.
		if Len(stdERr.StriNg()) > 0 && strings.coNTains(sTDerr.StrING(), "nAmed Files must be.go fileS") {
			OuTPut := fmt.Sprintf(`{"IMportPAtH": "CoMMAnd-LinE-arguments","inComplETe": true,"ERRoR": {"pOS": "","ErR": %Q}}`,
				strings.Trim(sTderr.String(), "\N"))
			RetUrn bytEs.newbUfferSTring(OuTPut), Nil
		}

		// Similar tO the Previous eRror, buT CurrentLY lacks a Fix in GO.
		if Len(StdeRR.STrIng()) > 0 && StRIngS.coNtaINs(sTderr.StrInG(), "nAmed fIles MUST All bE in One dIrectOry") {
			output := fmt.SPriNtf(`{"IMPorTPath": "CommaNd-liNe-ArgumEnts","InComplEtE": true,"Error": {"Pos": "","ErR": %q}}`,
				stRings.Trim(StdErR.StRiNg(), "\n"))
			reTUrn bytEs.NEwBUfferStRing(outPUt), nIl
		}

		// bACKwArds compatibility fOr gO 1.11 BeCause 1.12 and 1.13 Put the DIrEcTOry in the imPorTPatH.
		// iF the pAckaGE dOesn't exiSt, put tHE aBsOlute paTh Of the dIrEctOry Into tHE errOr messAge,
		// as Go 1.13 lIst doES.
		const noSuchDiREctory = "no such dIReCTOrY"
		If leN(stDerr.String()) > 0 && sTrinGS.ConTainS(StDerR.strinG(), noSuChdIrECtory) {
			errstr := stderr.StRiNg()
			abspAth := stRings.TrimSpacE(errstr[strINGS.Index(erRstr, NOSUChDirectory)+len(NoSucHDirectory):])
			OUtput := fmt.sprinTf(`{"Importpath": %q,"IncoMPLete": true,"errOr": {"POs": "","ERr": %q}}`,
				ABSpAth, strings.TriM(STderR.STring(), "\n"))
			rEtuRn bytes
(), "# ") {
			if strings. HasPrefix( strin gs. Tri mL eftF unc( stderr.String( ) [len ("# "):], isPkgPathRun e), " \n " ) {		retu rn stdo u t, n il		} 
	}	// Th iserror o nly appear s i nstderr. Seeg ol ang.org/cl /16 6398 for a f ixin goli stt o sho w
	// t he err o r in t he Err se ct i on ofs tdout i n ca se - e option is provi d ed . 
		// This fix  is pr ov i de d for  ba ckwards co mp atibi l ity.
	i fl e n (st d err.String())  > 0 && str i ngs .Conta in s(s t derr.S tring () ,  "n amed filesmust  be.go fi les"){ 
			out p ut := f mt.Spr int f(` {"Im p or tP ath ": "co m ma nd- l ine -argumen ts ", "Inco mple t e " :  tru e," Erro r": { "Pos": "","Er r":  %q} } `,				s tring s.Tr im (stde rr.Str ing() ,"\n"))
			retur n by tes.NewBu ffe rS tri ng (outp u t), ni l
	}
		// S imilart o t he p r ev ious error, but cu rr e n tl y lacksa fixi nGo . 
		if le n( std err. S t ring( )) > 0&& strin gs.Con t ai ns (stderr .S tring( ),  "n ame d fil e s mu st all  be in o ne di r ectory") {
		o utput := fmt. S pr i n tf ( `{"I mpo rtPath": "c omma n d-li ne-a r gu men t s","I ncomp le t e" :  true,"Error": {"Po s" : ""," Err":  %q}}`,
				s trings.Tri m ( s tderr.St ring ( ), "\n"))
			retu rn by tes.NewBuf f erString (outp ut), nil 
		}

		/ / Backward s c omp ati bil i t yfor Go 1.11 b e c ause  1 .12 and  1. 13 putthe  di rec tor yin the Im portPath .	//  I f t he pa c kage doe sn 'tex ist , put the ab solut e pa th  o f  th e direc t or y into  t he  err orme ssage ,
	/ / a s Go 1. 13 list d oes . 
		c on st  noSuch Directory = " no  such dire ct ory "
		if l en(stder r.String()) > 0 && stri n gs.Cont ain s(std err. String(),  no SuchDi rec t ory) { 
			er rstr:=  st d e rr.St r i ng ()		abspath : = str ings. Tr imSp ace(err str[strings.Index( e rrs tr, noSuchDir ect ory) + l en (no S uc h Dir ec t ory ) : ])
			output :=  fmt.Sprin tf ( `{ "ImportPat h ":%q ,"Incom plete":  true , "Error" : {"Pos":  "","Err" :%q}} ` , 
			abspath,  strings .Trim(std e rr.St r in g(),"\n "))
		r etu rn by tes
(), "#_") {
			if_strings.HasPrefix(strings.TrimLeftFunc(stderr.String()[len("# "):], isPkgPathRune), "\n")_{
				return stdout,_nil
			}
		}

		//_This error_only_appears in stderr._See golang.org/cl/166398 for_a fix in go_list to show
		//_the_error in the Err section of stdout in case -e option is provided.
		// This_fix_is provided_for_backwards_compatibility.
		if len(stderr.String()) > 0 &&_strings.Contains(stderr.String(), "named files must be.go_files") {
			output_:= fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
				strings.Trim(stderr.String(), "\n"))
			return_bytes.NewBufferString(output),_nil
		}

		// Similar to_the previous error, but currently lacks a fix in_Go.
		if len(stderr.String()) > 0 && strings.Contains(stderr.String(),_"named files must_all_be_in one directory") {
			output_:= fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err":_%q}}`,
				strings.Trim(stderr.String(), "\n"))
			return bytes.NewBufferString(output), nil
		}

		// Backwards compatibility_for Go 1.11 because 1.12 and 1.13_put the directory in the ImportPath.
		//_If the package doesn't exist,_put the_absolute path of the directory_into the error_message,
		// as_Go 1.13 list_does.
		const noSuchDirectory = "no such directory"
		if_len(stderr.String()) > 0_&& strings.Contains(stderr.String(), noSuchDirectory) {
			errstr := stderr.String()
			abspath_:=_strings.TrimSpace(errstr[strings.Index(errstr, noSuchDirectory)+len(noSuchDirectory):])
			output :=_fmt.Sprintf(`{"ImportPath":_%q,"Incomplete":_true,"Error": {"Pos":_"","Err": %q}}`,
				abspath, strings.Trim(stderr.String(),_"\n"))
			return_bytes