Creación de paquetes en Git para Go

Muchas veces queremos reutilizar códigos en nuestros proyectos, y que este disponible para personas de nuestra empresa o terceros. Para tal motivo podemos utilizar al GIT y configurar nuestro entorno para que tome los datos. Como ejemplo voy a indicar lo que se necesita hacer para utilizar GitHub

  1. Si los repositorios son privados se debe hacer lo siguiente
    1. Ejecutar el siguiente comando: git config –global url.git@github.com:.insteadOf https://github.com/
    2. Si ejecutamos cat ~/.gitconfig debemos ver el la configuración

      [url «git@github.com:»]
      insteadOf = https://github.com/

  2. Pasamos a crear el repositorio en GIT con el código fuente de nuestro proyecto.
  3. Ejecutamos go mod init para inicializar el modulo en GO del proyecto que estamos creando y en la primera línea donde esta la palabra module ponemos el path del proyecto, por ejemplo github.com/User/ModuleName, donde User es el usuario de GitHub y ModuleName el nombre que el damos al modulo
  4. Hacemos un push al GIT y generemos el release para manejar las distintas versiones.

Luego para reutilizar el código en nuevos proyectos debemos

  1. Si usamos proyectos privados, hay que configurar la variable GOPRIVATE con el repositorio privado de la siguiente manera go env -w GOPRIVATE=github.com/User/* donde User es el usuario de GitHub y * significa todos los proyectos.
  2. Con el comando go get <url> descargamos el proyecto
  3. Listo podemos usar la librería de nuestro proyecto

 

63 Comments

  1. Pingback: how to increase effects of cialis

  2. Pingback: flagyl hiivatulehdukseen

  3. Pingback: bactrim pastiglie

  4. Pingback: valacyclovir structure

  5. Pingback: how to lose weight on lyrica

  6. Pingback: apo-lisinopril/hctz

  7. Pingback: uptodate rybelsus

  8. Pingback: does cymbalta work right away

  9. Pingback: cheap prescription viagra

  10. Pingback: diclofenac sod 75

  11. Pingback: effexor for adhd

  12. Pingback: how long does it take for depakote to take effect

  13. Pingback: aspirin regimen

  14. Pingback: what does aripiprazole do

  15. Pingback: what is remeron 15 mg

  16. Pingback: abilify dosing

  17. Pingback: semaglutide 3mg dosage

  18. Pingback: actos latentes

  19. Pingback: venlafaxine para que sirve

  20. Pingback: buy ivermectin stromectol

  21. Pingback: how long does protonix stay in your system

  22. Pingback: ambrisentan and tadalafil

  23. Pingback: buy levitra without a prescription

  24. Pingback: online pharmacy coupon

  25. Pingback: female viagra 500mg

  26. Pingback: where to buy tadalafil

  27. Pingback: stromectol buy uk

  28. Pingback: purchase ivermectin

  29. Pingback: ivermectin pills

  30. Pingback: where can you get women's viagra

  31. Pingback: animal porn

  32. Pingback: animal porn

  33. Pingback: ananın amı

  34. Pingback: child porn

  35. Pingback: glyburide/metformin

  36. Pingback: cephalexin 500 mg

  37. Pingback: amoxicillin augmentin

  38. Pingback: ramipril vs lisinopril

  39. Pingback: porn

  40. Pingback: Cocuk pornosu

  41. Pingback: child porn

  42. Pingback: child porn

  43. Pingback: child porn

  44. Pingback: porn

  45. Pingback: fuck

  46. Pingback: child porn

  47. Pingback: sex

  48. Pingback: spam

  49. Pingback: porn

  50. Pingback: porn

  51. Pingback: child porn

  52. Pingback: child porn

  53. Pingback: iporn

  54. Pingback: child porn

  55. Pingback: porn

  56. Pingback: porn

  57. Pingback: porn

  58. Pingback: meritking

  59. Pingback: meritking

  60. Pingback: meritking

  61. Pingback: meritking

  62. Pingback: spam

  63. Pingback: child porn

Comments are closed.