This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type User struct { | |
| ID int | |
| Email string | |
| Name string | |
| } | |
| type UserRepository struct { | |
| db *sql.DB | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| func increment(counter *int, wg *sync.WaitGroup) { | |
| defer wg.Done() | |
| *counter++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const path = require('path'); | |
| const folderPath = 'path_to_folder'; // Replace with the path to your folder containing markdown files | |
| fs.readdir(folderPath, (err, files) => { | |
| if (err) { | |
| console.error('Error reading directory:', err); | |
| return; | |
| } |