Right now, substreams init generates file in the current directly. It's likely that the folder's name is the Substreams project's name.
Instead of hardcoding my_project, use something like strings.ReplaceAll(sanitizeProjectNameFromParentFolder(filepath.Base(filepath.Dir(os.Getcwd()))), "-", "_") .
Right now,
substreams init
generates file in the current directly. It's likely that the folder's name is the Substreams project's name.Instead of hardcoding
my_project
, use something likestrings.ReplaceAll(sanitizeProjectNameFromParentFolder(filepath.Base(filepath.Dir(os.Getcwd()))), "-", "_")
.