OSDN Git Service

Add Go lang support
authora <a@b.c>
Thu, 22 Jun 2017 18:31:31 +0000 (20:31 +0200)
committera <a@b.c>
Thu, 22 Jun 2017 18:31:31 +0000 (20:31 +0200)
README.md
doc/pinkybar.1
doc/pinkybar.texi

index 1c51487..ba731a0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -782,53 +782,6 @@ use **--without-colours** to skip the following step:
 
 ---
 
-## Go lang
-
-By default I decided not to include Go lang, but this doesn't mean you cannot do it by hand:
-
-```c
-/* test.c */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "hello.h"
-
-int main(void) {
-  HelloWorld();
-  return EXIT_SUCCESS;
-}
-```
-
-**hello.go**
-
-```go
-package main
-
-import "fmt"
-import "C"
-
-//export HelloWorld
-func HelloWorld() {
-  fmt.Printf("Hello %d", 123)
-}
-
-func main() {}
-```
-
-build it with:
-
-```bash
-go build -buildmode=c-archive hello.go
-gcc -pthread test.c hello.a -o test
-# test it with:
-./test
-```
-
-Obviously the Go code should return string when you make it into standalone module. It's easy to add the above code into standalone module that can be used by pinky-bar.
-
----
-
 ## OCAML lang
 
 Before invoking any of the installation commands you'll have to edit **src/Makefail.skel**:
index 588916f..1bbc0ec 100644 (file)
@@ -1638,62 +1638,6 @@ dwm compiled with statuscolor patch.
 The colours in use are specified in your dwm config.h
 .PP
    *   *   *   *   *
-.SS Go lang
-.PP
-By default I decided not to include Go lang, but this doesn't mean you
-cannot do it by hand:
-.IP
-.nf
-\f[C]
-/*\ test.c\ */
-#include\ <stdio.h>
-#include\ <string.h>
-#include\ <stdlib.h>
-
-#include\ "hello.h"
-
-int\ main(void)\ {
-\ \ HelloWorld();
-\ \ return\ EXIT_SUCCESS;
-}
-\f[]
-.fi
-.PP
-\f[B]hello.go\f[]
-.IP
-.nf
-\f[C]
-package\ main
-
-import\ "fmt"
-import\ "C"
-
-//export\ HelloWorld
-func\ HelloWorld()\ {
-\ \ fmt.Printf("Hello\ %d",\ 123)
-}
-
-func\ main()\ {}
-\f[]
-.fi
-.PP
-build it with:
-.IP
-.nf
-\f[C]
-go\ build\ \-buildmode=c\-archive\ hello.go
-gcc\ \-pthread\ test.c\ hello.a\ \-o\ test
-#\ test\ it\ with:
-\&./test
-\f[]
-.fi
-.PP
-Obviously the Go code should return string when you make it into
-standalone module.
-It's easy to add the above code into standalone module that can be used
-by pinky\-bar.
-.PP
-   *   *   *   *   *
 .SS OCAML lang
 .PP
 Before invoking any of the installation commands you'll have to edit
index 1884ffe..71d68cb 100644 (file)
@@ -98,7 +98,6 @@ cpu and motherboard sensors as @strong{modules} and not inlined.
 * *BSD Mandatory requirements::
 * Opt-in requirements::
 * WM specific requirements::
-* Go lang::
 * OCAML lang::
 * Rust lang::
 * Go lang::
@@ -1431,62 +1430,6 @@ your dwm config.h
 ------------------------------------------------------------------------
 @end ifnottex
 
-@node Go lang
-@section Go lang
-@anchor{#go-lang}
-By default I decided not to include Go lang, but this doesn't mean you
-cannot do it by hand:
-
-@verbatim
-/* test.c */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "hello.h"
-
-int main(void) {
-  HelloWorld();
-  return EXIT_SUCCESS;
-}
-@end verbatim
-
-@strong{hello.go}
-
-@verbatim
-package main
-
-import "fmt"
-import "C"
-
-//export HelloWorld
-func HelloWorld() {
-  fmt.Printf("Hello %d", 123)
-}
-
-func main() {}
-@end verbatim
-
-build it with:
-
-@verbatim
-go build -buildmode=c-archive hello.go
-gcc -pthread test.c hello.a -o test
-# test it with:
-./test
-@end verbatim
-
-Obviously the Go code should return string when you make it into
-standalone module. It's easy to add the above code into standalone
-module that can be used by pinky-bar.
-
-@iftex
-@bigskip@hrule@bigskip
-@end iftex
-@ifnottex
-------------------------------------------------------------------------
-@end ifnottex
-
 @node OCAML lang
 @section OCAML lang
 @anchor{#ocaml-lang}
@@ -1523,7 +1466,7 @@ pinkybar_LDADD = pinky.a
 
 @node Go lang
 @section Go lang
-@anchor{#go-lang-1}
+@anchor{#go-lang}
 The source code that you should edit is in @strong{src/pinky.go}, but
 you'll have to edit @strong{src/Makefail.skel} and add the following to: