Skip to content

Commit

Permalink
trying to fix git lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nabim777 committed Aug 28, 2023
1 parent 24f74d3 commit 8d39097
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,38 @@ func checkAnd(out io.Writer) int {
}

func main() {
file, err := os.Create("example.txt")
if err != nil {
fmt.Println("Error creating file:", err)
return
}
defer file.Close()

message := "Hello, world!"

_, err = io.WriteString(file, message)
if err != nil {
fmt.Println("Error writing to file:", err)
return
}

source := "Source content."
fmt.Println("Source:", source)
destFile, err := os.Create("copy.txt")
if err != nil {
fmt.Println("Error creating destination file:", err)
return
}
defer destFile.Close()

_, err = io.Copy(destFile, file)
if err != nil {
fmt.Println("Error copying data:", err)
return
}

fmt.Println("Write and copy operations completed successfully.")

out := new(bytes.Buffer)
exitStatus := 0
if len(os.Args) < 2 {
Expand Down

0 comments on commit 8d39097

Please sign in to comment.