// Give a warning rather than resolve relative paths
773589
func (f *FileResourceLookup) ResolvePath(path, inFile string) string {
	vs := strings.SplitN(path, ":", 2)
	if len(vs) == 2 && !filepath.IsAbs(vs[0]) {
		log.Warnf("Rancher Compose will not resolve relative path %s", vs[0])
	}
	return path
}
1241782
func (ctxt *package_lookup_context) gopath() []string {
	var all []string
	for _, p := range filepath.SplitList(ctxt.GOPATH) {
		if p == "" || p == ctxt.GOROOT {
			// Empty paths are uninteresting.
			// If the path is the GOROOT, ignore it.
			// People sometimes set GOPATH=$GOROOT.
			// Do not get confused by this common mistake.
			continue
		}
		if strings.HasPrefix(p, "~") {
			// Path segments starting with ~ on Unix are almost always
			// users who have incorrectly quoted ~ while setting GOPATH,
			// preventing it from expanding to $HOME.
			// The situation is made more confusing by the fact that
			// bash allows quoted ~ in $PATH (most shells do not).
			// Do not get confused by this, and do not try to use the path.
			// It does not exist, and printing errors about it confuses
			// those users even more, because they think "sure ~ exists!".
			// The go command diagnoses this situation and prints a
			// useful error.
			// On Windows, ~ is used in short names, such as c:\progra~1
			// for c:\program files.
			continue
		}
		all = append(all, p)
	}
	return all
}
1240703
func Warn(format string, values ...interface{}) {
	fmt.Fprintf(os.Stderr, fmt.Sprintf("%s%c", format, '\n'), values...)
}
1113962
func (g *Grok) AddPatternsFromPath(path string) error {
	if fi, err := os.Stat(path); err == nil {
		if fi.IsDir() {
			path = path + "/*"
		}
	} else {
		return fmt.Errorf("invalid path : %s", path)
	}

	// only one error can be raised, when pattern is malformed
	// pattern is hard-coded "/*" so we ignore err
	files, _ := filepath.Glob(path)

	var filePatterns = map[string]string{}
	for _, fileName := range files {
		file, err := os.Open(fileName)
		if err != nil {
			return err
		}

		scanner := bufio.NewScanner(bufio.NewReader(file))

		for scanner.Scan() {
			l := scanner.Text()
			if len(l) > 0 && l[0] != '#' {
				names := strings.SplitN(l, " ", 2)
				filePatterns[names[0]] = names[1]
			}
		}

		file.Close()
	}

	return g.AddPatternsFromMap(filePatterns)
}
844081
func (l *Logger) Warning(format string, a ...interface{}) {
	l.Log(LevelWarning, format, a...)
}
909461
func (sl *SysLogger) Warning(info, msg string) {
	sl.writer.Warning(info + " " + msg)
}
1103324
func ParsePathsFromArgs() {
	flag.Parse()
	for _, dir := range flag.Args() {
		var conf loader.Config
		conf.ParserMode = parser.ParseComments
		conf.ImportWithTests(dir)
		prog, err := conf.Load()
		if err != nil {
			panic(err)
		}

		r := renamer{prog, map[*token.File]bool{}}
		r.parse()
		if !*dryRun {
			r.write()
		}
	}
}
209151
func (f Fields) Warningf(c context.Context, fmt string, args ...interface{}) {
	Get(SetFields(c, f)).LogCall(Warning, 1, fmt, args)
}
1185470
func Warningf(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_WARNING, 2, fmt.Sprintf(format, v...), nil)
}
619934
func FixInjectionsWithRelativePath(workdir string, injections api.VolumeList) api.VolumeList {
	if len(injections) == 0 {
		return injections
	}
	newList := api.VolumeList{}
	for _, injection := range injections {
		changed := false
		if filepath.Clean(filepath.FromSlash(injection.Destination)) == "." {
			injection.Destination = filepath.ToSlash(workdir)
			changed = true
		}
		if filepath.ToSlash(injection.Destination)[0] != '/' {
			injection.Destination = filepath.ToSlash(filepath.Join(workdir, injection.Destination))
			changed = true
		}
		if changed {
			glog.V(5).Infof("Using %q as a destination for injecting %q", injection.Destination, injection.Source)
		}
		newList = append(newList, injection)
	}
	return newList
}
449611
func (cl *ConsoleLogger) WarningDepth(depth int, s string) {
	log.WarningDepth(1+depth, s)
}
652263
func relativePath(logPath string) string {
	cwd, cwdErr := os.Getwd()
	if cwdErr == nil {
		relPath := strings.TrimPrefix(logPath, cwd)
		if relPath != logPath {
			logPath = fmt.Sprintf(".%s", relPath)
		}
	}
	return logPath
}
568423
func Warningf(format string, args ...interface{}) {
	logMux.RLock()
	defer logMux.RUnlock()
	if logLevel <= LevelWarning {
		info := retrieveCallInfo().shortFormat()
		msg := fmt.Sprintf(format, args...)

		if shallLog(LevelWarning, info, msg) {
			logBackend.Warning(info, msg)
		}
	}
}
993174
func (s *Sprocket) resolvePath(assetPath string, baseDir string, forceRebuild bool) (string, *types.ExtensionInfo, error) {
	var err error
	ext := filepath.Ext(assetPath)
	extInfo := s.getExtensionInfoOrDefault(ext)
	if forceRebuild == false {
		assetPublicPath, _ := s.checkPublicPath(assetPath, baseDir)
		if len(assetPublicPath) > 0 {
			return assetPublicPath, extInfo, nil
		}
	}
	assetPath, ext, err = resolvePath(extInfo, assetPath, baseDir)
	if err != nil {
		return "", nil, err
	}
	return assetPath, s.getExtensionInfoOrDefault(ext), nil
}
84685
func warnf(format string, args ...interface{}) {
	fmt.Fprintf(os.Stderr, "vet: "+format+"\n", args...)
	setExit(1)
}
238263
func (l *logger) Warning(format string, args ...interface{}) {
	if l.Level >= WARNING {
		l.log(WARNING, format, args...)
	}
}
828573
func Warn(msg string, ctx ...interface{}) {
	root.write(msg, LvlWarn, ctx, skipLevel)
}