wip-code-check #44

Merged
lash merged 54 commits from wip-code-check into master 2024-09-10 14:25:50 +02:00
Member

This PR includes changes that adapt the USSD to go-vise:dev-0.1.0

This PR includes changes that adapt the USSD to go-vise:dev-0.1.0
carlos added 42 commits 2024-09-09 08:48:03 +02:00
carlos added 1 commit 2024-09-09 08:57:18 +02:00
carlos added 1 commit 2024-09-09 09:12:44 +02:00
carlos added 5 commits 2024-09-09 16:18:25 +02:00
carlos added 1 commit 2024-09-09 16:25:01 +02:00
lash requested changes 2024-09-10 03:05:30 +02:00
Dismissed
@ -35,0 +118,4 @@
var debug bool
flag.StringVar(&sessionId, "session-id", "075xx2123", "session id")
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
Owner

do we need this parameter?

do we need this parameter?
lash marked this conversation as resolved
@ -35,3 +37,3 @@
}
return os.WriteFile(afh.FilePath, jsonData, 0644)
return nil
Owner

WriteEntry is missing here?

`WriteEntry` is missing here?
@ -38,3 +39,4 @@
return nil
}
func (afh *AccountFileHandler) EnsureFileExists() error {
Owner

can be removed

can be removed
@ -0,0 +7,4 @@
"git.defalsify.org/vise.git/lang"
)
type DataStore interface {
Owner

This does not need to be so verbose, inherit interface (and implementer) instead. Consider:

package main

import (
        "fmt"
)

type A interface {
        Foo() int
}

type B interface {
        A
        Bar() string
}

type a struct {
}

func(ao *a) Foo() int {
        return 42
}


type b struct {
        A
}

func(bo *b) Bar() string {
        return "13"
}

func main() {
        var o B
        o = &b{
                A: &a{},
        }
        fmt.Printf("%d %s", o.Foo(), o.Bar())
}
This does not need to be so verbose, inherit interface (and implementer) instead. Consider: ``` package main import ( "fmt" ) type A interface { Foo() int } type B interface { A Bar() string } type a struct { } func(ao *a) Foo() int { return 42 } type b struct { A } func(bo *b) Bar() string { return "13" } func main() { var o B o = &b{ A: &a{}, } fmt.Printf("%d %s", o.Foo(), o.Bar()) } ```
lash marked this conversation as resolved
carlos added 3 commits 2024-09-10 10:24:31 +02:00
carlos added 1 commit 2024-09-10 14:15:08 +02:00
lash approved these changes 2024-09-10 14:25:19 +02:00
lash merged commit 63cee42261 into master 2024-09-10 14:25:50 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: urdt/ussd#44
No description provided.