Skip to content

yessypp/simple-read-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

simple-read-file

This repository contains an example of how to read file (txt and JSON file type) in Go.

Requirements

  • Go 1.20+

Setup

To clone the application to your local:

git clone <this_repositoy_web_url>

Usage

To run the application:

cd simple-read-file
go run main.go

The main.go will read files inside data/ folder. You will see below as the return:

Txt file:  Hey, world! good morning!
Print products with field name: [{ID:93938317 Name:Nike Running Shoes CreatedAt:11000909090} {ID:93938260 Name:White Midi Dress CreatedAt:11000909091}]
First product: {93938317 Nike Running Shoes 11000909090}

Learn more

About

Read file (txt, JSON) using Go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages