"Something went wrong when commiting heading migration: ")
createHeadingMarker()
}
funcshouldMigrateHeadings()bool{
file,err:=os.Open(headingMarkerPath)
ifos.IsNotExist(err){
returntrue
}
iferr!=nil{
log.Fatalln("When checking if heading migration is needed:",err.Error())
}
_=file.Close()
returnfalse
}
funccreateHeadingMarker(){
err:=ioutil.WriteFile(
headingMarkerPath,
[]byte(`This file is used to mark that the heading migration was successful. If this file is deleted, the migration might happen again depending on the version. You should probably not touch this file at all and let it be.`),