-
-
Save parzibyte/3f162b5e3b454d607579b138eb28275e to your computer and use it in GitHub Desktop.
This file contains 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 ( | |
"flag" | |
"fmt" | |
) | |
const PuertoPorDefecto = ":8000" | |
func main() { | |
puerto := flag.String("puerto", PuertoPorDefecto, "Puerto de escucha del servidor") | |
flag.Parse() | |
// Convertir el apuntador a string | |
puertoCadena := *puerto | |
// Imprimirlo | |
fmt.Println("El puerto es ") | |
fmt.Println(puertoCadena) | |
// Esperar que el usuario presione Enter | |
fmt.Scanln() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment