Thursday, March 29, 2012

Import Existing Maven in Eclipse : project has no J on the folder project


I made the following :
- Import  Existing Maven project
- Browse -> Choose Maven project (It has pom Module)

Then I saw in Package Explorer, that my project has a M for Maven but has no J for Java Project !
And therefore package are not managed .


Right Clic --> Configure --> Convert to facet form

Saturday, March 17, 2012

Go : read and write in a file

To read or write in a file, you can use the package io/ioutil which contains méthods like ReadFile orWriteFile

Example :

package main
import ("fmt";"io/ioutil")
func main() {
fmt.Print("Lecture \n");
contents,_ := ioutil.ReadFile("/home/damikde/tmp/server.log")
        fmt.Print("Ecriture \n");
   ioutil.WriteFile("/home/damikde/tmp/toto", contents, 0x777)

Wednesday, March 7, 2012

You can create a free Git open source project by using