Langsung ke konten utama

How to install Go Lang in Linux

1. Download the package in https://golang.org/dl/ for linux
2. Open your terminal and set the path in your package location
3. Extract the file with this command -> tar -C /usr/local -xzf name_of_package
4. Export path for go lang. Follow this command -> export PATH=$PATH:/usr/local/go/bin
5. Finish. Go lang already install in your computer.

If you wanna test the installation work or not follow this step :
1. create new directory src/hello in /usr/local/go/bin
$ mkdir hello
2. create file hello.go inside src/hello. the file content is like below :
package main

import "fmt"

func main() {
    fmt.Printf("hello, world\n")
}
3. and then set the path to src/hello and run this -> go build
4. for run the file, run this command -> ./hello
5. if you see "hello, world" message then your installation is succesfully.

Thnks for reading. If you have a problem please feel free to email me in yasminghassani@gmail.com. And i hope i can help you. :)


Komentar

Postingan populer dari blog ini

Validasi form hanya untuk inputan angka atau huruf saja menggunakan javascript

Berikut fungsi untuk membuat validasi sebuah form input untuk inputan angka saja atau huruf saja Ini yang untuk angka Ini yang untuk huruf Lalu untuk di dalam form inputnya tambah onkeypress="return namafungsi(event)" Contoh untuk input hanya huruf <input type="text" onkeypress="return huruf(event)" /> Simple kan. Selamat mencoba :)

A Simple Program with Java (Program untuk penukaran uang)

Halo semua.. kali ini aku mau share program sederhana pake java. Program kali ini untuk penukaran uang ke pecahan pecahan yang lebih kecil seperti seratus ribuan, lima puluh ribuan, dua puluh ribuan, sepuluh ribuan dan seribuan. Yang lagi belajar java dengan pengkondisian (if, if else dan switch) bisa mencoba program di bawah ini. Berikut source code nya : package project2; import java.util.Scanner; public class Project_2 {     public static void main(String[] args) {         //variabel         int uang, bagi, j_seratusan, j_limapuluhan, j_duapuluhan = 0, j_sepuluhan = 0, j_seribuan = 0;         int seratusan, limapuluhan, duapuluhan, sepuluhan, seribuan;         int pilihan;         int batas50 = 0;         Scanner input = new Scanner(System.in);         //input         System.out.println("========================...

A Simple Program with Java (Program untuk menghitung biaya rumah sakit)

package project1; import java.util.Scanner; public class Project_1 {     public static void main(String[] args) {         //inisialisasi variabel         String nama, kode;         int inap, obat, infus, tot_biaya;         //input         Scanner masukan = new Scanner (System.in);         System.out.println("=======================================================");         System.out.println(" Program untuk menghitung biaya rumah sakit");         System.out.println("=======================================================");         System.out.print("Masukkan nama pasien\t\t\t: ");         nama = masukan.nextLine();         System.out.print("Masukkan kode pasien\t\t\t: ");         kode = masukan.nextLine();         Sys...