mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
doc: fix case
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -380,8 +380,8 @@ func generateApplyHelpers(filename string, count int) error {
|
||||
// print out some helpers
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
F "github.com/ibm/fp-go/function"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
`)
|
||||
|
||||
|
@@ -5,7 +5,6 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
C "github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -84,34 +83,24 @@ func generateContextReaderIOEitherHelpers(filename string, count int) error {
|
||||
// log
|
||||
log.Printf("Generating code in [%s] for package [%s] with [%d] repetitions ...", filename, pkg, count)
|
||||
|
||||
// some header
|
||||
fmt.Fprintln(f, "// Code generated by go generate; DO NOT EDIT.")
|
||||
fmt.Fprintln(f, "// This file was generated by robots at")
|
||||
fmt.Fprintf(f, "// %s\n", time.Now())
|
||||
|
||||
fmt.Fprintf(f, "package %s\n\n", pkg)
|
||||
writePackage(f, pkg)
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
"context"
|
||||
|
||||
G "github.com/ibm/fp-go/context/%s/generic"
|
||||
G "github.com/IBM/fp-go/context/%s/generic"
|
||||
)
|
||||
`, pkg)
|
||||
|
||||
// some header
|
||||
fmt.Fprintln(fg, "// Code generated by go generate; DO NOT EDIT.")
|
||||
fmt.Fprintln(fg, "// This file was generated by robots at")
|
||||
fmt.Fprintf(fg, "// %s\n", time.Now())
|
||||
|
||||
fmt.Fprintf(fg, "package generic\n\n")
|
||||
writePackage(fg, "generic")
|
||||
|
||||
fmt.Fprintf(fg, `
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
RE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
RE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
`)
|
||||
|
||||
|
@@ -141,8 +141,8 @@ func generateEitherHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
A "github.com/ibm/fp-go/internal/apply"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
A "github.com/IBM/fp-go/internal/apply"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
`)
|
||||
|
||||
|
16
cli/header.go
Normal file
16
cli/header.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func writePackage(f *os.File, pkg string) {
|
||||
// print package
|
||||
fmt.Fprintf(f, "package %s\n\n", pkg)
|
||||
// some header
|
||||
fmt.Fprintln(f, "// Code generated by go generate; DO NOT EDIT.")
|
||||
fmt.Fprintln(f, "// This file was generated by robots at")
|
||||
fmt.Fprintf(f, "// %s\n", time.Now())
|
||||
}
|
@@ -53,8 +53,8 @@ func generateIdentityHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
A "github.com/ibm/fp-go/internal/apply"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
A "github.com/IBM/fp-go/internal/apply"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
`)
|
||||
|
||||
|
@@ -139,8 +139,8 @@ func generateOptionHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
A "github.com/ibm/fp-go/internal/apply"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
A "github.com/IBM/fp-go/internal/apply"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
`)
|
||||
|
||||
|
@@ -123,7 +123,7 @@ func generateReaderHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
G "github.com/ibm/fp-go/%s/generic"
|
||||
G "github.com/IBM/fp-go/%s/generic"
|
||||
)
|
||||
`, pkg)
|
||||
|
||||
|
@@ -160,7 +160,7 @@ func generateReaderIOEitherHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
G "github.com/ibm/fp-go/%s/generic"
|
||||
G "github.com/IBM/fp-go/%s/generic"
|
||||
)
|
||||
`, pkg)
|
||||
|
||||
@@ -173,8 +173,8 @@ import (
|
||||
|
||||
fmt.Fprintf(fg, `
|
||||
import (
|
||||
E "github.com/ibm/fp-go/either"
|
||||
RD "github.com/ibm/fp-go/reader/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
RD "github.com/IBM/fp-go/reader/generic"
|
||||
)
|
||||
`)
|
||||
|
||||
|
@@ -346,8 +346,8 @@ func generateTupleHelpers(filename string, count int) error {
|
||||
|
||||
fmt.Fprintf(f, `
|
||||
import (
|
||||
M "github.com/ibm/fp-go/monoid"
|
||||
O "github.com/ibm/fp-go/ord"
|
||||
M "github.com/IBM/fp-go/monoid"
|
||||
O "github.com/IBM/fp-go/ord"
|
||||
)
|
||||
`)
|
||||
|
||||
|
Reference in New Issue
Block a user