Created
January 22, 2020 22:08
-
-
Save vasa-develop/38aa4cf7f00fa9331843e80f350537a2 to your computer and use it in GitHub Desktop.
SimpleAsWater Tutorial: Hands On IPLD Tutorial: PART 2
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
scanner := bufio.NewScanner(os.Stdin) | |
fmt.Println("Enter the ID of the employee: ") | |
scanner.Scan() | |
inputID := scanner.Text() | |
fmt.Println("Enter the name of the employee: ") | |
scanner.Scan() | |
inputName := scanner.Text() | |
fmt.Println("Enter the salary of the employee: ") | |
scanner.Scan() | |
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