-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
440 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package binding_test | ||
|
||
type NoFieldTags struct { | ||
Name string | ||
Address string | ||
Zip *string | ||
Spouse *NoFieldTags | ||
} | ||
|
||
func (n NoFieldTags) Get() NoFieldTags { | ||
return n | ||
} | ||
|
||
var NoFieldTagsTest = BindingTest{ | ||
name: "NoFieldTags", | ||
structs: []interface{}{ | ||
&NoFieldTags{}, | ||
}, | ||
exemptions: nil, | ||
shouldError: false, | ||
want: ` | ||
export namespace binding_test { | ||
export class NoFieldTags { | ||
Name: string; | ||
Address: string; | ||
Zip?: string; | ||
Spouse?: NoFieldTags; | ||
static createFrom(source: any = {}) { | ||
return new NoFieldTags(source); | ||
} | ||
constructor(source: any = {}) { | ||
if ('string' === typeof source) source = JSON.parse(source); | ||
this.Name = source["Name"]; | ||
this.Address = source["Address"]; | ||
this.Zip = source["Zip"]; | ||
this.Spouse = this.convertValues(source["Spouse"], NoFieldTags); | ||
} | ||
convertValues(a: any, classs: any, asMap: boolean = false): any { | ||
if (!a) { | ||
return a; | ||
} | ||
if (a.slice && a.map) { | ||
return (a as any[]).map(elem => this.convertValues(elem, classs)); | ||
} else if ("object" === typeof a) { | ||
if (asMap) { | ||
for (const key of Object.keys(a)) { | ||
a[key] = new classs(a[key]); | ||
} | ||
return a; | ||
} | ||
return new classs(a); | ||
} | ||
return a; | ||
} | ||
} | ||
} | ||
`, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package git | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestEscapeName1(t *testing.T) { | ||
type args struct { | ||
str string | ||
} | ||
tests := []struct { | ||
name string | ||
args args | ||
want string | ||
wantErr bool | ||
}{ | ||
{ | ||
name: "Escape Apostrophe", | ||
args: args{ | ||
str: `John O'Keefe`, | ||
}, | ||
want: `John O'Keefe`, | ||
}, | ||
{ | ||
name: "Escape backslash", | ||
args: args{ | ||
str: `MYDOMAIN\USER`, | ||
}, | ||
want: `MYDOMAIN\\USER`, | ||
}, | ||
} | ||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
got, err := EscapeName(tt.args.str) | ||
if (err != nil) != tt.wantErr { | ||
t.Errorf("EscapeName() error = %v, wantErr %v", err, tt.wantErr) | ||
return | ||
} | ||
if got != tt.want { | ||
t.Errorf("EscapeName() got = %v, want %v", got, tt.want) | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,7 +254,7 @@ Now we need to configure some gon config files in our `build/darwin` directory: | |
"bundle_id": "app.myapp", | ||
"apple_id": { | ||
"username": "[email protected]", | ||
"password": "@env:APPLE_PASSWORD", | ||
"password": "your-app-specific-password", | ||
"provider": "ABCDE12345" | ||
}, | ||
"sign": { | ||
|
@@ -268,11 +268,13 @@ Here is a brief break down of the above fields: | |
- `source`: The location of your wails binary to be signed | ||
- `apple_id`: | ||
- `username`: Your Apple ID email address | ||
- `password`: Your app-specific password, referenced using Gon's environment variable syntax | ||
- `password`: Your app-specific password | ||
- `provider`: Your team ID for your App Store Connect account | ||
- `sign`: | ||
- `application_identity`: Your Apple developer identity | ||
|
||
The (https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool)[deprecated Apple's altool]'s syntax supporting `@env:` is no longer available since Apple has migrated to the new notarytool. | ||
|
||
Your developer identity and team ID can both by found on macOS by running the following command: | ||
|
||
```bash | ||
|
Oops, something went wrong.