Working with files in golang

  Рет қаралды 37,655

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
All the learning resources such as code files, documentations, articles and community discussions are available on our website:
chaicode.com/
You can find our discord link, github link etc on the above website.
Twitter/X link: x.com/hiteshdotcom
Discord link: hitesh.ai/discord
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...

Пікірлер: 30
@amansarraf6171
@amansarraf6171 2 жыл бұрын
You made this thing super easy, love you ♾️
@--husky_codes2099
@--husky_codes2099 Жыл бұрын
Great series Hitesh!!! Thanks a lot.
@shubhamsharma-np7us
@shubhamsharma-np7us 2 жыл бұрын
Thank you ❤️ for such amazing series
@nayyershahzad8051
@nayyershahzad8051 2 жыл бұрын
So lucky to find your channel!!!
@muppasaikrishna9403
@muppasaikrishna9403 Жыл бұрын
"I wanted to express my deep frustration and genuine admiration for the effort put into creating this video. Despite dedicating hours to watching and re-watching the content, I'm struggling to grasp the concept of file handling. It's disheartening to feel like I'm not making progress, especially considering the relatively short duration of the video (just 12 minutes). I want to emphasize that this frustration is in no way a reflection of your teaching abilities or the quality of the video itself. It's more a personal struggle stemming from my own limited understanding and possibly a lack of prerequisite knowledge in this area. I truly value your dedication to simplifying complex topics, and I can see the care you've taken in presenting the material. However, as a beginner, I may need more foundational explanations or step-by-step guidance to bridge the gap in my understanding. Please know that I appreciate the time and effort you've invested in creating this video, and I'm determined to continue my learning journey. I'll seek out additional resources, practice diligently, and strive to build a solid foundation in file handling. Thank you for sharing your knowledge, even if I haven't fully grasped it yet. Your commitment to helping learners like me is commendable, and I hope to eventually overcome these challenges and fully understand the concepts presented in this video. I'll keep pushing forward and eagerly await your future content."
@YouAndImpact
@YouAndImpact 2 жыл бұрын
Excellent 👌
@higiniofuentes2551
@higiniofuentes2551 2 ай бұрын
Thank you for this very useful video!
@yogeshukidwe9133
@yogeshukidwe9133 2 жыл бұрын
superb
@jeyhunaze7628
@jeyhunaze7628 5 ай бұрын
Thank you!
@jithunniks
@jithunniks 2 жыл бұрын
Can we use the same operations to read files of different format like jpeg, csv etc?
@d3vilop1
@d3vilop1 11 ай бұрын
No he said in the start we can only do it with txt files
@siddharthsinghh
@siddharthsinghh 2 жыл бұрын
Thanks
@rafae5902
@rafae5902 2 жыл бұрын
I'm new to Go, but this doesn't seem like a good use for "defer". You could remove that defer and things would still work. You can close the file before reading from it. Correct me if I'm wrong please?
@seyedhusseinmirzaki8056
@seyedhusseinmirzaki8056 Жыл бұрын
for real awesome 30 minuets in and 18 damn
@SriHarshaChilakapati
@SriHarshaChilakapati 2 жыл бұрын
My first thought, where is the module file?
@returnZeroo
@returnZeroo 2 жыл бұрын
How to create a file in the current directory? In nodejs we have __dirname. I searched a lot. I get this function os.Getwd(). But this returns the project root directory location instead of the current directory.
@ashishpradhan1027
@ashishpradhan1027 4 ай бұрын
Is there any difference between using the above way and this way ` err = os.WriteFile(inputFoler+"/main.go", []byte("package main func main() { }"), 0660)`
@AlokYadav-ly4ps
@AlokYadav-ly4ps Жыл бұрын
what are meaning of those integers?
@AlokYadav-ly4ps
@AlokYadav-ly4ps Жыл бұрын
those are ascii values got it
@saadiiii1680
@saadiiii1680 Жыл бұрын
sir please clear that where is the documentation you are talking about
@priyankabachhav5315
@priyankabachhav5315 Жыл бұрын
In this video Libraries that are imported- "fmt", " os", "io", " io/ioutil"
@lakshaygupta6951
@lakshaygupta6951 20 күн бұрын
Updated based on latest go release as of Jul 13, 2024 package main import ( "fmt" "io" "os" ) func main() { fmt.Println("files") content := "my first go lang files example" file, err := os.Create("./myfirstfile.txt") if err != nil { panic(err) } else { length, _ := io.WriteString(file, content) fmt.Printf("length of file is : %v ", length) defer file.Close() } readFile() } func readFile() { databyte, err := os.ReadFile("./myfirstfile.txt") if err != nil { panic(err) } fmt.Println(string(databyte)) }
@dnyaneshwarmane1211
@dnyaneshwarmane1211 Жыл бұрын
,
@mohfocus6666
@mohfocus6666 Жыл бұрын
Not doing "go mod init files" at the beginning made me uncomfortable 🤣
@yash.karmayogi
@yash.karmayogi 2 жыл бұрын
can you please upload the videos in atleast 2k
Handling web request in golang
12:12
Hitesh Choudhary
Рет қаралды 39 М.
Slices in golang
14:58
Hitesh Choudhary
Рет қаралды 39 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 13 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 46 МЛН
20240802 Catalyst Meraki D-1 Grandprix Hackathon Final Stage
2:43
Go Programming - JSON Encoding & Decoding in Golang
25:04
BugBytes
Рет қаралды 7 М.
Channels and Deadlock in golang
18:39
Hitesh Choudhary
Рет қаралды 23 М.
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 68 М.
Advanced Golang: Channels, Context and Interfaces Explained
22:17
Code With Ryan
Рет қаралды 114 М.
What is a File Format?
12:58
LiveOverflow
Рет қаралды 178 М.
A long video on MOD in golang
27:16
Hitesh Choudhary
Рет қаралды 31 М.
Loop break continue and goto in golang
12:20
Hitesh Choudhary
Рет қаралды 24 М.
Concurrency and goroutines in golang
13:18
Hitesh Choudhary
Рет қаралды 39 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 13 МЛН
Проверил, как вам?
0:58
Коннор
Рет қаралды 248 М.
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,3 МЛН