~samwhited/blogsync

ca42178fcf51513d2c3b5d226e17cdc8b50728bb — Sam Whited 1 year, 8 months ago 7246ec4
blogsync: remove uses of the global logger
1 files changed, 4 insertions(+), 4 deletions(-)

M convert.go
M convert.go => convert.go +4 -4
@@ 123,16 123,16 @@ backup or commit all files to source control before converting them.`,
				// Write the new metadata to the file
				_, err = fmt.Fprint(fd, "+++\n")
				if err != nil {
					log.Printf("could not write header start to %s: %v", path, err)
					logger.Printf("could not write header start to %s: %v", path, err)
				}
				e := toml.NewEncoder(fd)
				err = e.Encode(meta)
				if err != nil {
					log.Printf("error encoding TOML in %s: %v", path, err)
					logger.Printf("error encoding TOML in %s: %v", path, err)
				}
				_, err = fmt.Fprint(fd, "+++\n")
				if err != nil {
					log.Printf("could not write header close to %s: %v", path, err)
					logger.Printf("could not write header close to %s: %v", path, err)
				}

				// If there is no body, we're done. Don't bother adding an extra


@@ 143,7 143,7 @@ backup or commit all files to source control before converting them.`,

				_, err = fd.Write(body)
				if err != nil {
					log.Printf("failed to write body to %s: %v", path, err)
					logger.Printf("failed to write body to %s: %v", path, err)
				}
				return nil
			})