Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SimpleAsWater Tutorial: Hands On IPLD Tutorial: PART 2
scanner := bufio.NewScanner(os.Stdin)
fmt.Println("Enter the ID of the employee: ")
inputID := scanner.Text()
fmt.Println("Enter the name of the employee: ")
inputName := scanner.Text()
fmt.Println("Enter the salary of the employee: ")
inputSalary := scanner.Text()
// Create a struct instance and assign the input values to the corresponding fields
employeeObject := SampleStruct{ID: inputID, Name: inputName, Salary: inputSalary}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment