You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: stacks.go
    path of file: ./repos/kubernetes/vendor/go.uber.org/goleak/internal/stack
    
    the code of the file until where you have to start completion: // Copyright (c) 2017-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following 
    
func parseFuncName(line string) (name string, creator bool, err error) {
	if after, ok := strings.CutPrefix(line, "created by "); ok {
		// The function name is the part after "created by "
		// and before " in goroutine [...]".
		idx := strings.Index(after, " in goroutine")
		if idx >= 0 {
			after = after[:idx]
		}
		name = after
		creator = true
	} else if idx := strings.LastIndexByte(line, '('); idx >= 0 {
		// The function name is the part before the last '('.
		name = line[:idx]
	}

	if name == "" {
		return "", false, fmt.Errorf("no function found: %q", line)
	}

	return name, creator, nil
}