Skip to content

manzoor77/go-logfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

go-logfile

create logfile in go

  1. Run the command go run main.go to compile and execute the program.

  2. Open a web browser and navigate to http://localhost:8080

  3. You should see the message "Hello, World!" in the browser, and a log file called "api.log" should be created in the same directory as main.go.

Here's an example of what the console output should look like:

2023/04/10 15:42:17 Starting server on port 8080

2023/04/10 15:42:24 Request from 127.0.0.1:50586 for /

2023/04/10 15:42:27 Request from 127.0.0.1:50586 for /favicon.ico

Releases

No releases published

Packages

No packages published

Languages